Using unstructured library to pre-process PDF document content, to be in a cleaner format. This helps LLM to produce more accurate response. JSON response is generated thanks to Nous Hermes 2 PRO LLM. Without any additional post-processing. Using Pydantic dynamic class to validate response to make sure it matches request.
Sparrow GitHub repo:
https://github.com/katanaml/sparrow
0:00 Intro
0:44 Example
2:35 Code - Requirements
3:06 Code - Config
4:26 Code - HTML text
5:10 Code - Agent
8:03 Summary
CONNECT:
Subscribe to this YouTube channel
Twitter: / andrejusb
LinkedIn: / andrej-baranovskij
Medium: / andrejusb
#llm #rag #langchain