NNelara Technologies

Protected Module

RAG Architecture

Retrieval augmented generation combines document ingestion, vector retrieval, prompt assembly, citations, and evaluation.

Ingestion

Parse files, normalize text, split chunks, create embeddings, and store chunk metadata. Treat ingestion as a repeatable pipeline, not a one-off script.

Retrieval

Retrieve candidates, remove duplicates, preserve source titles, and build a context packet that fits the model's input window.

Prompt Assembly

Answer using only the provided sources.
If sources do not contain the answer, say so.
Return:
- answer
- cited_sources
- confidence
- missing_info

Evaluation

  • Groundedness: is answer supported?
  • Relevance: did retrieval find the right chunks?
  • Citation accuracy: do links match claims?
  • Refusal: does it refuse weak evidence?

Lab

Build a RAG endpoint over a folder of notes. Run ten questions and classify each failure as ingestion, retrieval, prompt, or source-data issue.

PreviousNext Module