Data Science Query Assistant - Part I
A live demo of the Data Science Query Assistant, a retrieval-augmented generation app built with Streamlit and LangChain for topic explanations, CSV analysis, and website chat.
What if you could ask a tool to explain a data science concept, quiz you on it, analyze a spreadsheet you just uploaded, and answer questions about a live website, all from the same interface? That's the pitch behind the Data Science Query Assistant, and in this first-part demo, creator Sahil Padyal shows the tool in action before diving into the code in a follow-up video.
A retrieval-augmented generation project
Padyal describes the assistant as a retrieval-augmented generation, or RAG, project, built with Streamlit and LangChain. It combines three tools in one interface: a query assistant for explaining topics, a dataset analysis tool for working with uploaded CSV files, and a link tool for chatting with any website.
Explaining topics, generating quizzes, and building flash cards
The demo starts with the query assistant. Typing in a topic, machine learning in this case, produces both a theoretical explanation and a set of quiz questions, limited to two in the demo, along with flash cards designed to support a more active style of learning. The underlying model for this feature is Cohere, which Padyal calls a strong, open-source option for the NLP processing involved.
Chatting with a CSV file
Next, the demo shows uploading a CSV dataset, in this case a forest fires dataset, and asking direct questions about it in plain language. Asking "what is this data set about" prompts the app to run a LangChain agent behind the scenes, visible in the demo as an agent executor chain working through the file, and returns an answer describing the dataset's contents: information about forest fires including location, day, weather conditions, and the area affected. Follow-up questions work the same way. Asking how many rows and columns the file contains triggers the agent to apply df.shape and returns the answer directly: 517 rows and 13 columns. Asking the tool to remove duplicate rows results in the agent applying df.drop_duplicates() and confirming the duplicates have been removed. The effect is a natural-language interface over ordinary pandas operations, letting a user interact with a dataset without writing code themselves.
Chatting with any website
The final feature lets users paste in a website link and converse directly with its content, which is especially useful for information that isn't reflected in a general-purpose model's training data. Padyal demonstrates this by loading a news site and asking for the top five headlines, and the tool extracts and returns them directly from the live page. He also shows a second use case: pointing the tool at technical documentation, in this case for LangChain, and asking how to install it. The tool extracts the relevant instructions straight from the documentation page, which Padyal frames as a more reliable alternative to asking a general chatbot that may not have current or accurate information about a fast-moving library.
Where the project could go next
Padyal is candid about the tool's current limitations. He's using a trial-based, open-source API for some of the language model calls, which means the app can get stuck under heavy request volume since only four or five requests are allowed at a time under the current plan. Looking ahead, he mentions wanting to add an image generator to the query assistant for creating mind maps as a further learning aid.
Key takeaways
- The Data Science Query Assistant combines three features in one Streamlit app: topic explanation, CSV analysis, and website chat.
- Topic explanations use the Cohere language model and come paired with auto-generated quizzes and flash cards.
- CSV analysis is powered by a LangChain agent that translates plain-language questions into pandas operations like
df.shapeanddf.drop_duplicates(). - The website chat feature extracts and answers from live page content, useful for both current events and technical documentation.
- The app is currently limited by trial API rate limits, which can cause it to stall under heavy use.
Who this is for
This walkthrough is aimed at anyone curious about what a practical RAG application looks like end to end, from a user's perspective, before getting into implementation. It's a useful preview for students, educators, or builders in the Humanitarians AI community who want to see the finished product before following the code-focused Part II.
Full transcript(auto-generated, with timestamps)
[0:02]Hi everyone my name is sah and I have built this project which is a data s quy assistant and this is basically uh built with streamlit and line chain and this is a rag project which is which means it's a retrieval argumented generator project so I have implemented uh three things in this project which is a query assistant uh data set analysis tool and a link link tool so that you can check with any website that you like so I'll show you a basic demo of how this projects works so here you can type in any topic that is related to data science so so
[1:00]Suppose uh you just type in machine learning and press enter take sometimes so here you can see uh it not only generates uh theoretical uh side of the generative but it also generates quiz questions which I have right now limited to two and flash cards for a better uh uh learning method for uh students who wants to learn data science so here here you can see of you can just look into what's in the flash cards here and also you can take instant quiz
[2:10]Which is automatically generated by the llm models which I have used so for this query assistance the llm model that I have used is a called coher Model so I'll show you so this is uh the model that I've used for NLP processing so yeah it's a really good model I would say and it it has work perfectly uh while implementing and it's also open source so that also we can use and coming to the next thing is so this feature is that like uh you can just add upload any CSV file uh to this suppose it's a data set or whatever it is and you can just ask direct
[3:24]Questions related to that CSV files with the llm so I'll show you with an example how it works so you can just ask a simple question like what is this data set about so llm will directly interact with the CSV file and give you answers related to any of your questions so so this is basically the CSV file that I have uploaded it's related to forest fires and you will see how in the back end it runs uh and read through the CSV files so you can see the Lang chain is entering new agent executed shap and it analyzes all the uh data which is in the
[4:28]File so here you can see the answer this data set contains information about forest fires including location once day weather condition and the area vector by you can also ask uh other questions like uh how many rows and columns are there so you'll see it will again start and chain and it automatically applies DF do shape to get to the final answer and then it will know there are 517 rows and 13 columns in the data frame and so it will give out the answer here so it's really cool like how you can just interact with the CSV files and just like do your data science work with
[5:34]Just asking the AI to do it for you so even if it's like uh you can just type in remove all the duplicates so here you can see here you can see uh it has automatically applied DF do drop duplicates so now it will give out the answer the duplicates have been removed from the data frame so it's a very useful tool I would say uh in when you're working with any data set so coming to the next feature that I've have added here is chatting with the websites so basically you can add any website link uh here in in this place and you can
[6:44]Directly chat with that website and it could be anything say uh I would say even the latest thing that are not updated in chat GPD which is like chat GPT is not updated every day okay so you can just uh ask like see latest US news today and you can just see like a cnns here go to politics see just you can paste it here okay so it loads your previous history also and then you can just ask
[7:57]The AI give me top five headlines and let's see how does it work and there you can see it at at uh extract uh the text from the websites that you give and here it will give you the top time for project from the website source and there you go like and that's very useful when you're building or working on any project that you're not sure of and you can just add uh documentation say if you're working with line chain you can like just give wa see uh this document link to the
[9:18]Application and just ask the question here how would I install my chain and press enter and let's see how does it responds and there you go you see how it attract extracts everything out from the website and it gives you all the basic details like like how would you go ahead so it's very useful when you are working on something new and you don't know the exact ways to implement things so you can just give out the document documentation of that Tech and you can easily get answers instead of uh testing it with J gbt which is never sure like it gives out the right answer or it is
[10:26]Updated as of the latest update from that website so this is the basic demo uh of my project and there are lot of improvements that can be done in this project uh going further like adding uh image generator uh in this query assistance where it can uh generate mind maps uh for Better Learning and uh with the loading data set uh this would is a very powerful tool I would say but it requires uh a good API as of like chat GPD right now I'm using a trial based open source API so it sometime gets stuck uh when it gets too much payload on the API as
[11:25]There are only four uh to five request uh allowed right now with this API so that will be all uh for the demo of my project in the next video I'll show how you can build one of these tools and how you can code these I'll show you the code thank you
More videos
2:08Bridging the Pixel Gap in Browser Automation.
2:23How One Narrow Safety Rule Can Make an AI Less Safe Everywhere Else.
2:04Why splitting a chunk from its document makes it retrieve for the wrong question
4:20Three You Can Take Back. One You Can't.
2:21Why a 50-turn agent pays for the same screenshot 35 times unless it caches the pixels
1:53