~/projects/agri-assistant-cloud

Agriculture Assistant: Cloud-Based RAG

A question-answering assistant over agricultural PDFs. It extracts information from tables and charts as well as text, and answers with page-level references.

Status
Completed
Context
Completed project
Type
RAG · Gemini
Screenshot of Agriculture Assistant: Cloud-Based RAG

01Problem

Agricultural PDFs mix prose, tables and charts, which are hard to represent consistently for retrieval.

02What I built

  • Used Gemini’s multimodal capabilities to extract information from tables and charts.
  • Worked on table representation, row linearization and keeping the embedding model consistent between indexing and querying.
  • Built a ChromaDB knowledge base and a Streamlit question-answering interface with source-page citations.

03How it works

  1. Agricultural PDF
  2. Gemini extraction
  3. Linearized table rows
  4. ChromaDB
  5. Answer with page reference

04Decisions

DecisionWhyTrade-off
Multimodal extractionTables and charts carry information that plain text extraction misses.Depends on a cloud API.
Row linearization for tablesMakes table content searchable as text.Table structure has to be represented carefully to stay meaningful.
Page-level citationsEvery answer can be traced back to its source.Reduces unsupported answers but does not guarantee correctness.

05Result

Outcome

A working Streamlit assistant designed to ground answers in the source documents and reduce unsupported responses.

Limitations

Relies on a cloud API. Grounding reduces unsupported answers but does not eliminate them.

Stack

PythonLangChainGoogle GeminiChromaDBStreamlit

06Related writing

Why Table Extraction in RAG is a much Harder Problem than extracting a Plain Text on Medium.