Problem Statement
Concept-RAG currently processes PDF and EPUB documents to extract text-based chunks and concepts. However, many technical documents contain valuable visual content (diagrams, flowcharts, charts, figures) that convey information not captured in text. This visual information is currently lost during ingestion.
Current state:
- Documents are chunked as text segments only
- Diagrams are either ignored or produce garbled OCR artifacts
- Search results cannot surface or leverage visual content
- Users cannot find documents based on diagram content
Desired state:
- Diagrams and visual content are detected and extracted during ingestion
- Visual content is stored as searchable "visual tokens"
- Search results can be enriched with relevant diagrams
- Visual inference enables concept discovery from diagrams
Goal
Extract and store diagrams as searchable "visual tokens" that enrich search results with visually codified information. Enable visual inference on concepts and data.
Scope
In Scope
- Flowcharts, UML diagrams, architecture diagrams
- Charts and graphs (bar, line, pie, etc.)
- Figures with captions, photos, illustrations
- Tables (as visual content)
Out of Scope
- Mathematical equations (already handled via
has_math flag)
User Stories
US-1: Diagram Extraction
As a user, I want diagrams extracted from my documents during seeding so that visual information is preserved in the knowledge base.
Acceptance Criteria:
US-2: Visual Description Generation
As a user, I want each diagram to have an LLM-generated description so that it becomes searchable via semantic search.
Acceptance Criteria:
US-3: Visual-Enriched Search Results
As a user, I want search results to include relevant diagrams so that I get both textual and visual context for my queries.
Acceptance Criteria:
US-4: Visual Type Filtering
As a user, I want to filter search results by visual type so that I can find specific kinds of diagrams.
Acceptance Criteria:
References
Problem Statement
Concept-RAG currently processes PDF and EPUB documents to extract text-based chunks and concepts. However, many technical documents contain valuable visual content (diagrams, flowcharts, charts, figures) that convey information not captured in text. This visual information is currently lost during ingestion.
Current state:
Desired state:
Goal
Extract and store diagrams as searchable "visual tokens" that enrich search results with visually codified information. Enable visual inference on concepts and data.
Scope
In Scope
Out of Scope
has_mathflag)User Stories
US-1: Diagram Extraction
Acceptance Criteria:
US-2: Visual Description Generation
Acceptance Criteria:
US-3: Visual-Enriched Search Results
Acceptance Criteria:
broad_chunks_searchcan optionally return associated visualsconcept_searchcan surface diagrams linked to conceptsUS-4: Visual Type Filtering
Acceptance Criteria:
diagram,chart,figure,tablevisual_typefilterReferences