Ingestion and chunking strategies
How GENIE.AI turns an uploaded document into searchable, contextualised, labelled chunks — chunk sizing, Contextual Retrieval strategies, and the decoupled-labelling mode.
The RAG (Retrieval-Augmented Generation) pipeline turns a user question into a grounded answer drawn from the indexed knowledge base. Every stage runs on infrastructure you control: no third-party model API is required.
Query → Backend (BFF) → ChatQnA → Embedding → Retriever (ArangoDB) → Reranker → LLM → [Translation] → Response
Every stage emits OpenTelemetry spans, propagated across service boundaries
with the W3C traceparent header, so a single query can be traced end to end
in VictoriaTraces and Grafana. See the
Observability section for the full
debugging workflow.
The list is ordered to follow the pipeline end-to-end, from ingest (step 0) through query and back to the user.
per_chunk
vs doc_level), the labelling + embedding stage, what gets stored in
ArangoDB, and per-chunk observability. Pairs with the user-facing
Knowledge base → Ingestion.STREAMING_TRANSLATION_ENABLED.data: events,
the terminal data: [DONE], and the metadata envelope (source_documents,
retrieval_confidence_score, confidence_score, is_grounded,
self_confidence).retriever_parameters and reranker_parameters on a single chat
request without changing global env defaults.MODEL_DETECT_TTL).CHATQNA_ENFORCE_ABSTENTION=true is the default and is the single most
important guardrail for a public-sector knowledge base — see
Generation → Abstention.chatqna.orchestrate
root, with chatqna-side children such as chatqna.reranker_selection emitted
during reranker alignment) plus per-request metrics
(chat_requests_total, chat_rag_duration_seconds), making latency and
retrieval-quality regressions visible in VictoriaMetrics.How GENIE.AI turns an uploaded document into searchable, contextualised, labelled chunks — chunk sizing, Contextual Retrieval strategies, and the decoupled-labelling mode.
End-to-end request lifecycle of the GENIE.AI RAG pipeline, from query to grounded, translated response.
Hybrid dense-vector + lexical (BM25) retrieval over ArangoDB, optional knowledge-graph traversal, reciprocal-rank fusion, and label filtering.
Cross-encoder reranking strategies, score calibration, and how the user-facing confidence score is derived.
LLM system prompt, abstention behaviour, self-confidence scoring, streaming translation, and the SSE wire format.
On-by-default per-chunk context prefix that improves retrieval precision by embedding chunks with their source context.
Selecting and configuring models for GENIE.AI (LLM, embedding, reranker, translation) across GPU profiles.
How GENIE.AI labels ingested chunks against the service-category taxonomy and uses those labels to filter retrieval.
The SSE wire format ChatQnA emits to the backend, the metadata envelope, and the marker-stripping pass that keeps internal conversation markers out of the stream.
Feature-flagged vector-space blending lets follow-up questions retrieve the subject of the previous turn, fixing stateless retrieval for pronoun-heavy queries.
Translate the answer in the target language WHILE the English stream is being delivered — unit-by-unit with markdown AST preservation, controlled by STREAMING_TRANSLATION_ENABLED.
How to override retriever and reranker parameters on a single chat request without changing global env defaults.
TTL-cached auto-detection of the model served by a remote vLLM endpoint — how the cache works, the MODEL_DETECT_TTL knob, and how services pick up model swaps without a restart.