Use Case
Use LangChain to Create Q&A Application on Sravz Financial Data
Session 1
Dataflow Diagram
Topics
- Overview of the architecture
- High-level description of LangChain - Loaders, Tool, Agent, LLM
- Perform sample queries
Video explanation of the code
Source Code
Session 2
Dataflow Diagram
Topics
- Query cost improvements by using vector embeddings and similarity search
- RecursiveJsonSplitter to split large JSON file
- Use HuggingFace all-MiniLM-L6-v2 to create vector embeddings
- Use ChromaDB to store and query vector embeddings
- Extend JSONToolKit used by JSON Agent
- Perform sample queries and analyze cost
Video explanation of the code
Source Code
Session 3
Dataflow Diagram
Topics
- LangChain - Multi Agent - Retrieval Augmented Generation
- JSON Agent and Pandas Agent Integration
- Supervisor - Agent set up
- Sample Queries
Video explanation of the code
Session 4
Dataflow Diagram
Topics
- LangSmith - debug langgraph.
- Relevant document search update - make the documents more relevant.
- Add code = filename to all the objects recursively
- Integrate AWS S3 with JSONSplitter.
- In JSON Agent remove tools not used by the graph, this will prevent looping
- Remove pandas agent and use Python REPL agent.
- LangChain pandas agent hard codes a data frame and forwards to python repl agent, instead of that just provide the python repl agent.
- Sample Queries
Video explanation of the code
Source Code
References
- https://github.com/IvanReznikov/DataVerse/blob/main/Onepagers/pdfs/langchain.pdf
- https://www.kdnuggets.com/wp-content/uploads/LangChain_Cheat_Sheet_KDnuggets.pdf
- https://github.com/ronidas39/LLMtutorial/tree/main
- https://gist.github.com/sravzpublic/e22aeff797aaa110c790b33773908744
- https://github.com/langchain-ai/langgraph/blob/main/examples/multi_agent/agent_supervisor.ipynb?ref=blog.langchain.dev