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

Code explanation video

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

Code explanation video

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

Code explanation video

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

Code explanation video

LangChainSession4

Session 5

Dataflow Diagram

Topics

  • LangSmith - debug langGraph.
  • Use LangGraph to perform Agentic Processing of JSON Files
  • Sample Queries:
    1. Get YTD Direction
    2. Get Yield To Expense Ratio
    3. Get Top Holdings
    4. Get Market News Summary
    5. Recommend based on Yield Direction

Code explanation video

TBD

Source Code

References

comments powered by Disqus