LegacyLens is a RAG system for legacy COBOL codebases with citation-grounded answers, dependency mapping, and explicit fallback UX.
- App:
<DEPLOYED_URL> - Video:
<DEMO_VIDEO_URL>
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"- See
docs/SETUP.mdfor env vars, local Qdrant setup, ingest commands, and validation gates.
- See
docs/ARCHITECTURE.mdfor full flow. - Key path:
- syntax-aware chunking
- OpenAI embeddings (
text-embedding-3-small) - Qdrant semantic retrieval + keyword fallback
- query guardrails (vague input rejection, empty-index rejection, weak-evidence abstain)
- answer generation + citations-only fallback
- SSE streaming endpoint (
POST /query/stream)
- Main entry point:
Where is the main entry point? - CUSTOMER-RECORD modifiers:
Where is CUSTOMER-RECORD modified? - CALCULATE-INTEREST explanation:
Explain CALCULATE-INTEREST flow. - File I/O operations:
Where is file I/O handled? - MODULE-X dependencies:
What depends on MODULE-X? - Error handling patterns:
Show error handling patterns.
- FastAPI
- Qdrant
- OpenAI embeddings (
text-embedding-3-smallby default) - OpenAI LLM answer generation
- COBOL corpus under
data/andsrc/legacylens/sample_codebase/
<DEPLOYED_URL>
pytest -q
python scripts/validate_corpus.py --codebase data
python scripts/validate_traceability.py