Logo Lanfrica

AgriDataAfrica/A2Search

Domain:

agriculturenatural language processing

Record type:

software
Creator:
Agr
Host:
Agriculture search engine for Africa. Documents, data, images, videos and instant farm business answers. # A2Search A search engine that only knows agriculture in Africa. It crawls agricultural sites for pages, PDFs, spreadsheets, images and videos, indexes everything locally, and answers questions the way a farmer or agripreneur actually asks them. Type "tanzania vs kenya maize" and you get a production chart next to the results. Type "gross margin" and you get a working calculator, not ten links about accounting. The full plan, including which open source projects we reuse and why, is in .plan.md. Progress lives on the project board. ## How it is put together Three services share one Postgres database, one Meilisearch index and one MinIO file store. The crawler starts from about a hundred trusted seed domains (FAO, CGIAR centers, ministry sites, statistics bureaus) and scores every link against an agriculture word list in English and Swahili before fetching it. Pages that turn out not to be about agriculture get dropped. PDF, CSV and Excel files go into MinIO. Images and YouTube links from accepted pages go into a media table. Built on Crawl4AI. The indexer parses each file, splits the text into pieces, embeds them with a local Ollama model (or Hugging Face, one line in .env switches it), and writes to Meilisearch for keyword search and pgvector for meaning search. The API combines both search results, streams a short cited answer from whatever model you point it at (Groq, OpenAI, or local Ollama, same client), and routes questions to instant answers: country comparisons, crop and region panels, a feed mix solver, gross margin and break even calculators. Country data comes from a local copy of FAOSTAT covering all 52 African countries. The frontend is Next.js. It follows your system's light or dark setting. ## Running it You need Postgres with pgvector, Meilisearch, MinIO and Ollama installed (all available through Homebrew), plus Python 3.11+ with uv and Node. ```bash cp .env.example .env # pick your embedding provider and answer model uv venv .ven …