#How do I enhance my PDF RAG App's mathematical capabilities ?

3 messages · Page 1 of 1 (latest)

green steppe
#

Hello everyone,
I'm currently working on a multimodal PDF RAG app ( to do QA with PDFs containing texts, images, tables ) .
The core of it is a RAG chain which takes the user query and returns the answer. It works for text , returns images and able to display the tables and answers from it .
When I ask math related questions from the tables in the pdf , it fails badly.
Currently I've modified my system prompt asking the LLM to double check , perform calculations in step by step manner etc., still I don't get correct answers .
Mathematical Operations Format:
Step 1: Define the objective
Step 2: List source data with references
Step 3: Show the calculation setup
Step 4: Perform step-by-step operations
Step 5: Verify results
Step 6: Present the final result with context
above is the snippet from my system prompt. Is this enough ?
What can I do to enhance my app's mathematical capabilities ?
Should I use an agent instead of a normal LCEL chain ?

solid sparrow
#

Have you read through the responses and understood whether the issues are primarily coming from a) incorrect extraction from the tables or b) incorrect arithmetic?

#

Or c) the RAG itself not picking up the right tables