Build a Simple AI RAG System with LangChain 1.0
Level: Real World
Your task for today is to create a minimal document chat assistant using LangChain v1 that loads your documents and answers questions about them using core LangChain concepts.
Project Task
Create a minimal document chat assistant that:
Loads all PDF, text (.txt), and markdown (.md) files from a folder
Combines all documents into a single context string
Uses LangChain’s
init_chat_modelto initialize the AI modelSends the entire context to an AI model with system messages
Answers questions about your documents in a conversational way
Maintains message history for context
Basic Features:
Load multiple file types (PDFs, text files, markdown files)
Simple document loading - no complex processing or vector stores
Uses LangChain’s unified chat model interface
Chat interface - ask questions naturally
Message history - remembers previous questions and answers
Works with OpenAI or Google GenAI models
Easy to use - just load and chat!
This project introduces you to core LangChain concepts, document processing, AI chat applications, and building practical AI tools — essential skills for working with LangChain and documents.
Expected Output
Chat with your documents! (type ‘quit’ to exit)
You: What are the land and building asset amounts of rabit in 2023
Assistant: Based on the documents, the land and building asset amounts for rabit in 2023 are:
- Land assets: $2.5 million
- Building assets: $5.8 million
Total real estate assets: $8.3 million
You: What was the total revenue?
Assistant: According to the documents, the total revenue for 2023 was $15.2 million.
You: quit
Goodbye!
Join the Python & AI Builders Skool Community
Got questions to ask the author about this project? Join our Python & AI Builders community for weekly Python & AI videos and discussions:
💻 View This Project in Jupyter Notebook
Become a premium member to access the working code in a Jupyter Notebook with the ready-to-run solution to get the output instantly and extend the code as you wish.
Click below to access the notebook (7-day risk-free trial):
Keep reading with a 7-day free trial
Subscribe to Daily Python Projects to keep reading this post and get 7 days of free access to the full post archives.


