How bhavyapuri15/autonomous-sg-airbus works
AD Trace is a decision-support search application for FAA airworthiness-directive proposals. Users search or check applicability in a Next.js workspace; FastAPI routes requests through identifier routing, hybrid retrieval, deterministic applicability/revision checks, and verified answer generation. Citations preserve quoted Federal Register evidence for the PDF viewer. Separate ingestion builds the indexed corpus, including final-rule evidence. The README documents the major runtime flow; several backend modules are unsampled, so relationships within those subsystems are shown only where documented, and optional LLM selection is marked dashed.
Main entry points: pipeline.py Answer pipeline · main.py FastAPI endpoints · hybrid_search.py Hybrid retrieval · build_db.py Corpus ingestion
Components 26
User workspace
- Search workspace
frontend/app/(app)/search/page.tsx - Applicability checker
frontend/app/(app)/applicability/page.tsx - Directive explorer
frontend/app/(app)/directives/page.tsx - Answer and citations
frontend/components/AnswerPanel.tsx - Source PDF viewer
frontend/components/DocumentViewer.tsx
Query and answers
- FastAPI endpoints
backend/api/main.py - Answer pipeline
backend/answer/pipeline.py - Intent and hints
backend/answer/query_parse.py - LLM quote selector
backend/answer/llm.py
Corpus and retrieval
- Identifier router
backend/retrieval/id_router.py - Hybrid retrieval
backend/retrieval/hybrid_search.py - BM25 search
backend/retrieval/bm25.py - Dense embeddings
backend/retrieval/embeddings.py - Passage chunking
backend/retrieval/chunker.py - SQLite index
backend/ingestion/build_db.py - Corpus ingestion
backend/ingestion/build_db.py - FR XML page mapping
backend/ingestion/fr_xml_parser.py - PDF page extraction
backend/ingestion/pdf_parser.py - Final-rule evidence
backend/ingestion/final_rules_ingest.py
Rules and evidence
- Applicability engine
backend/rules/applicability.py - Revision evidence graph
backend/rules/revisions.py - Claim verifier
backend/verification/citations.py - Citation enrichment
backend/citation_meta.py
Evaluation
- Evaluation dashboard
frontend/app/(app)/evaluation/page.tsx - Evaluation runner
evaluation/evaluate.py
Other components
- Aviation user
Connections 34
- Aviation user → Search workspace: searches
README.md - Aviation user → Applicability checker: checks aircraft
README.md - Aviation user → Directive explorer: browses directives
README.md - Search workspace → FastAPI endpoints: sends queries
README.md - Applicability checker → FastAPI endpoints: requests check
README.md - Directive explorer → FastAPI endpoints: requests records
README.md - FastAPI endpoints → Answer pipeline: routes query
README.md - FastAPI endpoints → Applicability engine: runs check
backend/api/main.py - Answer pipeline → Intent and hints: parses intent
backend/answer/pipeline.py - Answer pipeline → Identifier router: routes identifiers
README.md - Identifier router → Hybrid retrieval: falls back to search
README.md - Answer pipeline → Hybrid retrieval: retrieves passages
README.md - Hybrid retrieval → BM25 search: ranks keywords
README.md - Hybrid retrieval → Dense embeddings: ranks vectors
README.md - Hybrid retrieval → Passage chunking: searches chunks
README.md - Corpus ingestion → FR XML page mapping: parses FR XML
- Corpus ingestion → PDF page extraction: extracts PDF pages
- Corpus ingestion → SQLite index: writes corpus
README.md - Corpus ingestion → Final-rule evidence: ingests rule evidence
README.md - Final-rule evidence → SQLite index: adds rule records
README.md - SQLite index → Hybrid retrieval: supplies indexed text
README.md - SQLite index → Applicability engine: supplies rule text
backend/rules/applicability.py - Answer pipeline → Applicability engine: checks applicability
backend/answer/pipeline.py - Answer pipeline → Revision evidence graph: checks revision status
backend/answer/pipeline.py - Answer pipeline → Claim verifier: verifies claims
README.md - Answer pipeline → LLM quote selector: selects quotes
README.md - Answer pipeline → Citation enrichment: enriches citations
backend/answer/pipeline.py - FastAPI endpoints → Answer and citations: returns answer
README.md - Answer and citations → Source PDF viewer: opens cited page
README.md - FastAPI endpoints → Directive explorer: serves directive data
README.md - Evaluation dashboard → Evaluation runner: presents evaluation
- Evaluation runner → Answer pipeline: evaluates answers
evaluation/evaluate.py - Evaluation runner → Hybrid retrieval: measures retrieval
evaluation/evaluate.py - Evaluation runner → Revision evidence graph: scores revisions
evaluation/evaluate.py