How vedlegendary/gdg-askutd works
AskUTD is a UTD-information question-answering app: a browser submits a question, the API retrieves relevant official-source passages, and answer generation returns concise cited text or abstains. The graph preserves the UI/API, retrieval and generation stages, plus storage, catalog and feedback capabilities. Corpus ingestion is an offline supporting workflow, not part of answering a request. Several links rely on the README because their implementation excerpts were not provided.
Main entry points: main.py FastAPI app · generation.py Answer generator · chat.py Chat route · retrieval.py Retrieval service
Components 22
Browser experience
- AskUTD interface
components/ask-utd-app.tsx - Web API client
lib/api.ts
API service
- FastAPI app
backend/app/main.py - Chat route
backend/app/routes/chat.py - Catalog route
backend/app/routes/catalog.py - Feedback route
backend/app/routes/feedback.py - Health route
backend/app/routes/health.py - Rate limiter
backend/app/ratelimit.py - Shared answer types
backend/app/types.py
Evidence retrieval
- Retrieval service
backend/app/retrieval.py - Lexical index
backend/app/retrieval_support/index.py - Query resolution
backend/app/retrieval_support/query.py - Intent and scope
backend/app/retrieval_support/focus.py - Evidence checks
backend/app/retrieval_support/precision.py
Answer generation
- Answer generator
backend/app/generation.py - Answer prompts
backend/app/prompts.py - Extractive fallback
backend/app/llm/extractive.py - Model providers
backend/app/llm
Corpus and records
- SQLite records
backend/app/db.py - PDF ingestion
add_documents.py - PDF text extraction
pdf_to_text.py
Other components
- Student
Connections 29
- Student → AskUTD interface: asks
README.md - AskUTD interface → Web API client: submits questions
components/ask-utd-app.tsx - Web API client → FastAPI app: calls API
README.md - FastAPI app → Chat route: routes requests
backend/app/main.py - FastAPI app → Catalog route: routes requests
backend/app/main.py - FastAPI app → Feedback route: routes requests
backend/app/main.py - FastAPI app → Health route: routes requests
backend/app/main.py - FastAPI app → Rate limiter: configures
backend/app/main.py - FastAPI app → SQLite records: initializes
backend/app/main.py - Chat route → Retrieval service: requests passages
README.md - Chat route → Answer generator: requests answer
README.md - Retrieval service → Lexical index: searches chunks
backend/app/retrieval.py - Retrieval service → Query resolution: resolves and checks
backend/app/retrieval.py - Retrieval service → Evidence checks: reranks evidence
backend/app/retrieval.py - Query resolution → Intent and scope: uses intent rules
backend/app/retrieval_support/query.py - Evidence checks → Intent and scope: uses scope rules
backend/app/retrieval_support/precision.py - Answer generator → Answer prompts: uses prompts
backend/app/generation.py - Answer generator → Extractive fallback: selects fallback
backend/app/generation.py - Answer generator → Model providers: selects provider
README.md - Answer generator → Intent and scope: checks answer focus
backend/app/generation.py - Answer generator → Evidence checks: checks evidence
backend/app/generation.py - Chat route → Shared answer types: uses shared types
backend/app/routes/chat.py - Retrieval service → Shared answer types: returns passages
backend/app/retrieval.py - Answer generator → Shared answer types: returns answer
backend/app/generation.py - Feedback route → SQLite records: stores feedback
README.md - Chat route → SQLite records: records requests
README.md - AskUTD interface → Feedback route: sends ratings
components/ask-utd-app.tsx - Catalog route → SQLite records: reads catalog
- PDF ingestion → PDF text extraction: extracts text
add_documents.py