{"id":30765215,"url":"https://github.com/anshulranjan2004/sqlrx-docnexusai","last_synced_at":"2026-05-18T04:42:52.758Z","repository":{"id":306921651,"uuid":"1018666558","full_name":"AnshulRanjan2004/SQLRx-DocNexusAI","owner":"AnshulRanjan2004","description":"LLM-powered natural language to SQL for healthcare claims search. Supports multi-table joins, filters, and structured results.","archived":false,"fork":false,"pushed_at":"2025-07-28T11:40:51.000Z","size":10652,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-28T13:27:24.547Z","etag":null,"topics":["agentic-ai","crewai","langchain-python","streamlit","text-to-sql"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AnshulRanjan2004.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-12T19:00:01.000Z","updated_at":"2025-07-28T11:40:56.000Z","dependencies_parsed_at":"2025-07-28T13:37:36.371Z","dependency_job_id":null,"html_url":"https://github.com/AnshulRanjan2004/SQLRx-DocNexusAI","commit_stats":null,"previous_names":["anshulranjan2004/sqlrx-docnexusai"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/AnshulRanjan2004/SQLRx-DocNexusAI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnshulRanjan2004%2FSQLRx-DocNexusAI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnshulRanjan2004%2FSQLRx-DocNexusAI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnshulRanjan2004%2FSQLRx-DocNexusAI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnshulRanjan2004%2FSQLRx-DocNexusAI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AnshulRanjan2004","download_url":"https://codeload.github.com/AnshulRanjan2004/SQLRx-DocNexusAI/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnshulRanjan2004%2FSQLRx-DocNexusAI/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273649432,"owners_count":25143632,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-04T02:00:08.968Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agentic-ai","crewai","langchain-python","streamlit","text-to-sql"],"created_at":"2025-09-04T17:58:44.136Z","updated_at":"2026-05-18T04:42:47.737Z","avatar_url":"https://github.com/AnshulRanjan2004.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🩺 SQLRx – DocNexus AI \n**Natural Language to SQL for Healthcare Claims Analytics**\n\nLLM-powered natural language to SQL for healthcare claims search. Supports multi-table joins, filters, and structured results. This prototype allows commercial teams to query healthcare claims data using natural language. Designed for scalability and healthcare-specific accuracy, it converts free-form questions into actionable SQL, supports interpretation, compliance checks, and intelligent refinement.\n\n## Architecture Diagram\n\n![SQLRx-DocSearchAI Architecture](assets/Architecture%20Diagram.png)\n\n\n## 🧠 Architecture Highlights  \n- **Agentic Workflow**: Built using **LangChain** for modular and scalable task delegation.  \n- **Model-Agnostic LLM**: Gemini Flash used for dev; swappable with GPT-4 or Claude for better results.  \n- **Database**: Lightweight **SQLite** backend (easily extendable to Postgres/Snowflake).  \n- **RAG Support**: Schema ingested via text files or direct introspection to improve SQL generation.  \n- **Auto Execution \u0026 Feedback**: Queries are run and errors/results are fed back for 2–3 retry loops.\n\n## 🧰 Tech Stack  \n\n| Component         | Tool/Library           |\n|------------------|------------------------|\n| Frontend UI       | Streamlit              |\n| LLM Orchestration | LangChain + Python     |\n| Language Models   | Gemini 2.5 Flash / GPT-4 |\n| Backend DB        | SQLite (extensible)    |\n\n## ✨ Key Features  \n- 🔍 **Natural Language to SQL**  \n- 🛡️ **Compliance Checks (HIPAA/PHI)**  \n- ♻️ **Regenerate Query if Unsatisfied**  \n- 📊 **Query Accuracy Metrics + Logging**  \n- 💡 **Schema + Domain-Aware Interpretation**  \n- ⚙️ **Direct DB Execution from UI**\n\n## 📝 Notes \u0026 Assumptions  \n- Domain concepts (ICD-10, CPT, HCP, etc.) are embedded into all prompt workflows  \n- Schema is interpreted dynamically to adapt to structural changes  \n- Prototype is privacy-aware with simplified PHI/PII validation  \n- System is optimized for dev use but ready for enterprise scale-up\n\n## 📸 Screenshots  \n\u003e See the `Documentation and Screenshots.pdf` for visuals of query generation, execution, compliance validation, and logging UI.\n\n## 📂 Folder Structure\n\n```\n├── src/\n│ ├── langchain_agents.py # Modular agent definitions\n│ ├── streamlit_app.py # UI logic\n│ └── utils/ # Helpers, schema loaders\n├── config/ # Crew AI prototype (discarded)\n├── vanna-ai/ # Vanna AI prototype (discarded)\n├── SchemaNotes.txt # Optional schema hints\n└── README.md\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanshulranjan2004%2Fsqlrx-docnexusai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanshulranjan2004%2Fsqlrx-docnexusai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanshulranjan2004%2Fsqlrx-docnexusai/lists"}