Langchain

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

LangChainSession1

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

LangChainSession2

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

LangChainSession3

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

LangChainSession4

Source Code

References

comments powered by Disqus