Home
GazprombankClient · project at CIARS

Search across corporate knowledge

Finds supporting passages when an answer spans several documents and concepts have different names.

Search with source references

Deployed hybrid search across document text and a corporate knowledge graph.

STACK

  • Python
  • FAISS
  • BM25
  • RRF
  • Jina embeddings
  • Qwen3-Reranker

How a concept leads retrieval back to a source

concept → relation → passagePan the diagram or select a stage below
A concept has a name. And a route to its source. The ontology connects wordings; retrieval brings back the relevant text. KNOWLEDGE PREPARATION Mentions in documents “approval process” “the approval processes” name · context · passage ID Canonical concept Approval process definition + name variants occurrences → passage A, passage B Typed relationship process ── contains ─→ stage candidate → LLM review → selection relation context retained for inspection Merging duplicates also updates passage-to-entity references. FROM A QUESTION TO CONNECTED TEXT Question Match concepts bymeaning and name Processseed concept A Procedureseed concept B Stagerelated concept contains describes Back to the sources Passage A Passage B Traversal depth and links to current seeds limit expansion. CONTEXT FUSION AND SELECTION Three candidate lists FAISSmeaning BM25terms Conceptsgraph + occurrences RRF ranks → fused list Qwen3-Reranker filter · RRF order retained candidate backfill LLM context Selected passagesConcept definitionsConcept relationships Illustrative examples · a mechanism diagram, not a visualization of customer data

The graph leads retrieval back to source passages. RRF merges three lists; Qwen3 filters relevance while preserving RRF order and backfilling candidates.

DIAGRAM NOTE

Authored reconstruction. Concepts and passages are illustrative.

Scroll diagram ↔
Tools by task

NLP & ontology

Python · LLM extraction · Fuzzy matching

Entity extraction, definitions, duplicate consolidation and typed relationships.

Retrieval

Jina embeddings · FAISS · BM25 · RRF

Separate entity and passage indexes, three retrieval channels and rank fusion.

Context & answers

Qwen3-Reranker · LLM

Relevance checking, context assembly and answer generation.

Inspection & evaluation

NetworkX · Pyvis · LLM-as-judge

Structure visualization, graph diagnostics and reference-based answer evaluation.

Architecture, step by stepHighlighted data flow and technical walkthrough

Concepts and sources: from documents to answer context

Scroll to highlight each stage and its data flow.

01 / 06
Concepts and sources: from documents to answer contextKNOWLEDGE CONSTRUCTIONRETRIEVAL AND ANSWER PREPARATIONANSWER EVALUATIONDocumentspassages and sourcesExtractionconcepts and occurrencesDefinitionssource-text contextMerge duplicatesnames → canonical IDsTyped relationscandidate → reviewOntologyconcepts · links ·occurrencesHierarchyderived from definitionsDiagnosticsstructure and conflictsQuestionuser wordingMatch conceptsembeddings and namesGraph traversaldepth and seed connectionsConcept passagesdocument occurrencesSemantic searchJina embeddings · FAISSLexical searchBM25 · term matchingRank fusionRRF · three listsRelevance checkQwen3-RerankerAnswer contexttext + concepts + linksAnswerLLM · generationReference answersquestions and criteriaLLM-as-judgereference comparisonQuality analysisaccuracy · completeness ·relevance

Pan to explore the diagram ↔

DataModelStateEvaluation

Connect different mentions to one concept

01

Connect different mentions to one concept

Entities and their occurrences are extracted from passages. Definitions add context to names; deduplication merges variants and rewrites references to canonical IDs.

02

Build relationships that can be inspected

Relation candidates receive a type and undergo contextual review. Hierarchy is also derived from definitions. Separate diagnostics help examine conflicts and graph structure.

03

Expand matched concepts and locate their sources

The question matches concepts through embeddings and names. Traversal considers incoming and outgoing relations, shared links, depth and support from current seeds. Concept occurrences lead to text passages.

04

Fuse three retrieval signals

FAISS searches by meaning, BM25 by words, and the entity–graph channel by occurrences of matched concepts. RRF combines list positions without mixing incompatible raw scores.

05

Assemble useful answer context

Qwen3-Reranker checks candidate relevance. Selected texts are enriched with definitions and relationships of matched concepts. The LLM generates an answer from that context.

06

Evaluate answers separately from graph structure

The framework compares generated answers with references. LLM-as-judge assesses accuracy, relevance and completeness, supporting analysis of different retrieval configurations.