How zinia94/querydesk_ai_semantic_search works
QueryDesk AI lets employees upload internal text or PDF/DOCX documents, search them semantically with department filtering, open full documents, and delete them. The principal workflow runs from the React Home screen through FastAPI endpoints to document extraction/chunking, embedding, and Elasticsearch; search embeds the query and retrieves ranked chunks. Startup creates the index and can seed sample documents. The graph preserves the documented upload, retrieval, deletion, and UI capabilities. Source excerpts show the main calls; unsampled frontend and backend details are not inferred.
Main entry points: search.py Document API · Home.tsx Search and manage · main.py FastAPI startup · utils.py Chunk and index
Components 16
Employee interface
- App navigation
frontend/src/App.tsx - Search and manage
frontend/src/pages/Home.tsx - About page
frontend/src/pages/About.tsx
HTTP application
- FastAPI startup
backend/app/main.py - Runtime settings
backend/app/config.py - Document API
backend/app/api/search.py - Request and result models
backend/app/models.py
Document ingestion
- File extraction
backend/app/services/utils.py - Chunk and index
backend/app/services/utils.py - Seed documents
backend/app/seed_data.py
Semantic search
- Text embeddings
backend/app/services/embedding.py - Vector search
backend/app/services/elastic.py
Document storage
- Document retrieval and deletion
backend/app/services/elastic.py - Index management
backend/app/services/elastic.py
Other components
- Employee
- Elasticsearch
Connections 24
- Employee → Search and manage: uses
README.md - App navigation → Search and manage: routes to
frontend/src/App.tsx - App navigation → About page: routes to
frontend/src/App.tsx - Search and manage → Document API: calls search and upload
frontend/src/pages/Home.tsx - Search and manage → Document API: requests full document
frontend/src/pages/Home.tsx - Search and manage → Document API: requests deletion
frontend/src/pages/Home.tsx - FastAPI startup → Document API: registers router
backend/app/main.py - FastAPI startup → Runtime settings: reads settings
backend/app/main.py - FastAPI startup → Index management: checks and creates index
backend/app/main.py - FastAPI startup → Seed documents: optionally seeds
backend/app/main.py - Document API → Request and result models: uses request models
backend/app/api/search.py - Document API → File extraction: extracts uploaded files
backend/app/api/search.py - Document API → Chunk and index: processes uploaded text
backend/app/api/search.py - Document API → Text embeddings: embeds query
backend/app/api/search.py - Document API → Vector search: searches documents
backend/app/api/search.py - Document API → Document retrieval and deletion: retrieves or deletes
backend/app/api/search.py - Seed documents → Chunk and index: processes seed text
backend/app/seed_data.py - Chunk and index → Text embeddings: embeds chunks
backend/app/services/utils.py - Chunk and index → Index management: indexes chunks
backend/app/services/utils.py - Text embeddings → Runtime settings: selects model
backend/app/services/embedding.py - Vector search → Elasticsearch: queries index
backend/app/services/elastic.py - Document retrieval and deletion → Elasticsearch: reads and deletes
backend/app/services/elastic.py - Index management → Elasticsearch: manages index
backend/app/services/elastic.py - Vector search → Runtime settings: uses index config
backend/app/services/elastic.py