{"id":41634248,"url":"https://github.com/shreyasgm/ask-atlas","last_synced_at":"2026-03-13T01:06:24.137Z","repository":{"id":260657685,"uuid":"881349877","full_name":"shreyasgm/ask-atlas","owner":"shreyasgm","description":"Chatbot to use natural language to query trade data from the Atlas of Economic Complexity","archived":false,"fork":false,"pushed_at":"2025-12-15T21:47:17.000Z","size":331,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-19T05:57:20.412Z","etag":null,"topics":["chatbot","text-to-sql","trade"],"latest_commit_sha":null,"homepage":"https://ask-atlas.streamlit.app/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shreyasgm.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-10-31T11:58:16.000Z","updated_at":"2025-02-15T13:40:41.000Z","dependencies_parsed_at":"2024-11-01T17:18:59.635Z","dependency_job_id":"6c6393b4-f427-49a6-8d9d-9c066fdcea92","html_url":"https://github.com/shreyasgm/ask-atlas","commit_stats":null,"previous_names":["shreyasgm/ask-atlas"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shreyasgm/ask-atlas","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shreyasgm%2Fask-atlas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shreyasgm%2Fask-atlas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shreyasgm%2Fask-atlas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shreyasgm%2Fask-atlas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shreyasgm","download_url":"https://codeload.github.com/shreyasgm/ask-atlas/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shreyasgm%2Fask-atlas/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28730243,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T10:24:43.181Z","status":"ssl_error","status_checked_at":"2026-01-24T10:24:36.112Z","response_time":89,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["chatbot","text-to-sql","trade"],"created_at":"2026-01-24T14:47:22.337Z","updated_at":"2026-01-24T14:47:22.991Z","avatar_url":"https://github.com/shreyasgm.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ask-Atlas\n\nAsk-Atlas is an AI agent designed to answer questions about international trade data using the Atlas of Economic Complexity database. It leverages a combination of LangChain, Streamlit, and Large Language Models (LLMs) to answer user queries.\n\n## Features\n- **Natural Language to SQL:** Converts user questions into optimized SQL queries.\n- **Trade-Specific Query Processing:** Supports multiple product classifications (SITC, HS 1992, 2012, etc.) and looks up product codes separately first before generating SQL queries.\n- **Agentic Query Planning:** Breaks complex queries into sub-questions and executes them sequentially.\n- **Interactive Follow-ups:** Maintains conversation history, allowing users to ask follow-up questions.\n- **Safe and Relevant Responses:** Automatically filters harmful or irrelevant questions.\n\n## Workflow Overview\n\n```mermaid\nflowchart TD\n    A[User Question] --\u003e B{Check Input Type}\n    B --\u003e|Non-trade/Harmful| C[Refuse to Answer]\n    B --\u003e|Valid Trade Input| D[Agentic Query Planning]\n    \n    D --\u003e E[Break Question into Sub-Questions]\n\n    E --\u003e|Products Found| F[Product Lookup]\n    E --\u003e|No Products| H[Generate SQL Query]\n    \n    F --\u003e|Product Codes| H\n    E --\u003e E2[Get Schema]\n    E2 --\u003e|Schema| H\n    \n    H --\u003e H1[Validate SQL Query]\n    H1 --\u003e H2[Execute Query]\n    H2 --\u003e H3{Answer Complete?}\n    H3 --\u003e|No| D\n    H3 --\u003e|Yes| J[Generate Final Response]\n    \n    \n    style C fill:#ffcccc\n    style F fill:#e6f3ff\n    style D fill:#e6e6ff\n    style J fill:#e6ffe6\n```\n\n## Usage\nAsk-Atlas supports natural language queries about international trade data. Example questions:\n\n- *\"What were the top 5 products exported by the US to China in 2020?\"*\n- *\"How did Brazil's wheat exports change between 2010 and 2020?\"*\n- *\"What services did India export to the US in 2021?\"*\n\nUsers can refine their queries or ask follow-ups, and the system will maintain context.\n\n## Planned Enhancements\n- **Advanced Query Optimization:** Improving SQL generation efficiency.\n- **Adding evals**: Adding a set of evals to the project with an LLM-as-a-judge to check for correctness against a range of known questions and answers.\n- **FastAPI Integration**: Integrating the existing project with a FastAPI backend so that the system can be deployed on other services such as Slack, an app, or even integrated into the Atlas.\n\n## Acknowledgments\nAsk-Atlas relies on the Atlas trade database curated by the Harvard Growth Lab. Thanks to the Growth Lab development team for maintaining the database and making a copy available specifically for this project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshreyasgm%2Fask-atlas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshreyasgm%2Fask-atlas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshreyasgm%2Fask-atlas/lists"}