- Parse the PDF file and extract tables into images (optional).
- A single RAG agent fails to get the accurate information from tabular data.
- An agentic workflow using a groupchat is able to extract information
accurately:
- the agentic workflow uses a RAG agent to extract document metadata (e.g. the image of a data table using just the table name)
- the table image is converted to Markdown through a multi-modal agent
- finally, an assistant agent answers the original question with an LLM
Unstructured-IO is a dependency for this notebook to parse the PDF. Please install AG2 (with the neo4j extra) and the dependencies:
- Install Poppler https://pdf2image.readthedocs.io/en/latest/installation.html
- Install Tesseract https://tesseract-ocr.github.io/tessdoc/Installation.html
pip install -U ag2[openai,neo4j], unstructured==0.16.11, pi-heif==0.21.0, unstructured_inference==0.8.1, unstructured.pytesseract==0.3.13, pytesseract==0.3.13
Note: If you have been usingautogen
orag2
, all you need to do is upgrade it using:orasautogen
, andag2
are aliases for the same PyPI package.