How unimib-datai/dave works
DAVE supports document-collection exploration, entity-based search, conversational question answering, and human correction of annotations. The typical user workflow is to search or browse a collection, inspect documents and entities, then ask questions or refine annotations. Its indexing and retrieval services support that workflow alongside document and collection management. The graph combines README capabilities with sampled source; links involving unsampled routers and service internals are limited to documented responsibilities rather than inferred implementation details.
Main entry points: document.ts Document routes · search.ts Search routes · document.js Document service · vectorSearch.ts Vector retrieval
Components 20
User interface
- Search and chat
frontend/modules/search/LLMSearch.tsx - Collection browser
frontend/modules/documents/DocumentsList.tsx - Document annotation
frontend/modules/document/DocumentViewer/DocumentViewer.tsx - Annotation inference
frontend/modules/infer/QueryText/QueryText.tsx
Application services
- Search routes
frontend/server/routers/search.ts - Document routes
frontend/server/routers/document.ts - Annotation routes
frontend/server/routers/annotation.ts - Inference routes
frontend/server/routers/infer.ts - Document service
backend/documents/src/controllers/document.js - Collection service
frontend/lib/documentsBackend/collectionController.ts
Indexing and AI
- Faceted search
frontend/lib/facetedSearch.ts - Vector retrieval
frontend/lib/vectorSearch.ts - Document vectorizer
backend/qavectorizer/src/app.py - Entity extraction
backend/annotationPipeline/pipeline.py - Text generation
backend/text-generation/src/app.py
Persistence and indexes
- MongoDB
frontend/lib/db/models/index.ts
External services
- Elasticsearch
- Embedding models
- OpenAI-compatible model
Other components
- Domain expert
Connections 22
- Domain expert → Search and chat: searches or asks
- Domain expert → Collection browser: browses collections
- Domain expert → Document annotation: reviews and corrects
- Domain expert → Annotation inference: requests annotations
- Search and chat → Search routes: requests search
- Search routes → Faceted search: runs faceted search
- Search routes → Vector retrieval: requests retrieval
- Faceted search → Elasticsearch: queries index
- Vector retrieval → Embedding models: embeds query
- Vector retrieval → Text generation: requests answer generation
- Text generation → OpenAI-compatible model: streams completion
- Collection browser → Document routes: requests documents
- Document annotation → Document routes: reads and updates
- Document routes → Document service: manages documents
- Document routes → Collection service: manages collections
- Document service → MongoDB: reads and writes
- Collection service → MongoDB: reads and writes
- Document service → Elasticsearch: deletes indexed document
- Annotation inference → Inference routes: submits text
- Inference routes → Entity extraction: requests extraction
- Document vectorizer → Embedding models: generates embeddings
- Document vectorizer → Elasticsearch: indexes documents