{"repo":"LNshuti/usgov-contracts-rag","free":true,"listed":false,"github":"https://github.com/LNshuti/usgov-contracts-rag","clone":"git clone https://github.com/LNshuti/usgov-contracts-rag.git","description":"Use Text to SQL to analyze US Government contract data","language":"Jupyter Notebook","stars":24,"topics":["duckdb","duckdb-wasm","gradio","text-to-sql"],"license":null,"category":"ai-agents","readme_excerpt":"Retrieval Augmented Generation Text-to-SQL Application To Analyze US Government Contract Data This python application uses Retrieval Augmented Generation(RAG) to ask the data questions directly using plain English. The application then uses OPENAI's GPT 4.o-mini model to convert this question i.e prompt into SQL, which then queries the DuckDb database that stores the data and returns the solution, in addition to the SQL statement that generates this data . The simplicity of testing the correctness of the answers makes this application a powerful, and useful use of Large Language Models(LLMs) in Data Science that can directly provide values to Business Users who are unfamiliar with SQL by allowing them to directly use Business Questions to answer Data Questions in seconds with a Gradio Application. Demo Customize this Application with your own Data If you found the app useful, please make sure to give us a star! Clone this Repository Setup your Environment Activate your Environment Install Dependencies Add your data in the data folder Update path in the connect db.py file to load your Excel/CSV data into the database Run the connect db.py python helper file to load your data into the database Examine the data with Datasette Run the app.py python file to start the Gradio Application Update: 03/28/2025 I just published a medium article proving more details on this app, and the plan for keeping the underlying data up to date to keep the application useful. Please read on! Referen","default_branch":null,"files":null,"tree":[],"storefront":"/r/LNshuti","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/LNshuti/usgov-contracts-rag/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}