[{"data":1,"prerenderedAt":275},["ShallowReactive",2],{"blog-en-\u002Fen\u002Fblog\u002Flocal-llm-rag-agronomy-assistant":3},{"id":4,"title":5,"body":6,"description":256,"extension":257,"meta":258,"navigation":270,"path":271,"seo":272,"stem":273,"__hash__":274},"en_blog\u002Fen\u002Fblog\u002Flocal-llm-rag-agronomy-assistant.md","A Local LLM and RAG Agronomy Assistant: PlantFarm AI Operator",{"type":7,"value":8,"toc":239},"minimark",[9,14,27,35,39,42,70,73,77,84,139,142,146,151,158,162,170,174,177,181,198,202,209,213],[10,11,13],"h2",{"id":12},"why-an-assistant","Why an Assistant?",[15,16,17,22,23],"p",{},[18,19,21],"a",{"href":20},"\u002Fen\u002Fblog\u002Fplantfarm-scan-drone-ai-tree-health-with-getek","PlantFarm Scan"," produces a lot of numbers after each flight: which tree's NDRE dropped, how many trees are getting worse, where the ground looks different. The agronomist's real question is not a number, though: ",[24,25,26],"em",{},"\"What could be happening to this tree, and what should I check in the field?\"",[15,28,29,30,34],{},"The ",[31,32,33],"strong",{},"AI Operator"," is the chat panel we added to answer that. It is not a general chatbot; it grounds its answer in two sources: the project's own measurements and curated walnut disease literature.",[10,36,38],{"id":37},"how-it-works","How It Works",[15,40,41],{},"When the user asks a question, the backend gives the model two things:",[43,44,45,56],"ol",{},[46,47,48,51,52,55],"li",{},[31,49,50],{},"Measurement context",": the project's trend summary (counts of rising and falling trees, the 15 worst performers). If a tree is selected on the map, its full NDVI, NDRE and GCI series across all flights. This data is read from ",[31,53,54],{},"the same services"," the interface uses, so the number on screen and the number the model sees can never differ.",[46,57,58,61,62,65,66,69],{},[31,59,60],{},"Corpus passages",": the literature is split into chunks and turned into vectors (embeddings). The ",[31,63,64],{},"6 chunks"," closest in meaning to the question are added to the prompt. This is ",[31,67,68],{},"RAG (Retrieval-Augmented Generation)",".",[15,71,72],{},"The answer streams back; the user sees the first words within seconds.",[10,74,76],{"id":75},"why-a-local-model","Why a Local Model?",[15,78,79,80,83],{},"Farm data is commercially sensitive: the state of each orchard, yield estimates, parcel information. So we built the assistant to run in-house on ",[31,81,82],{},"Ollama",":",[85,86,87,103],"table",{},[88,89,90],"thead",{},[91,92,93,97,100],"tr",{},[94,95,96],"th",{},"Component",[94,98,99],{},"Choice",[94,101,102],{},"Note",[104,105,106,118,129],"tbody",{},[91,107,108,112,115],{},[109,110,111],"td",{},"Chat model",[109,113,114],{},"Qwen3 4B",[109,116,117],{},"~2.5 GB, runs on a single mid-range GPU",[91,119,120,123,126],{},[109,121,122],{},"Embeddings",[109,124,125],{},"bge-m3",[109,127,128],{},"Multilingual; Turkish and English sources in one index",[91,130,131,134,136],{},[109,132,133],{},"Server",[109,135,82],{},[109,137,138],{},"Comes up with the application via Docker Compose",[15,140,141],{},"On first setup the models (~3.7 GB) are pulled by a separate one-off service. The application does not wait for it; the map works immediately and the assistant panel shows a notice until the model is ready.",[10,143,145],{"id":144},"pitfalls-we-hit","Pitfalls We Hit",[147,148,150],"h3",{"id":149},"putting-everything-into-the-corpus","Putting everything into the corpus",[15,152,153,154,157],{},"In the first attempt we also added a general pest guide covering every crop. The result: a question about walnuts was answered with an unrelated pest, a bramble mite, because the symptom description looked similar. ",[31,155,156],{},"In RAG, more documents does not mean better answers."," Restricting the corpus to walnut-focused sources clearly improved accuracy.",[147,159,161],{"id":160},"the-models-thinking-output","The model's \"thinking\" output",[15,163,164,165,169],{},"Qwen3 can produce an internal monologue before answering. The obvious way to turn it off is sending ",[166,167,168],"code",{},"think: false"," to the API; in the version we used, that wove the monologue into the answer instead of dropping it. Not sending the parameter and keeping the thinking block in its own field was the right fix. Details like this only surface in real user testing.",[147,171,173],{"id":172},"reindexing-time-on-an-older-gpu","Reindexing time on an older GPU",[15,175,176],{},"Re-indexing the corpus takes minutes on an older-generation GPU. We added a hint to the interface so users do not keep pressing the button.",[10,178,180],{"id":179},"applying-it-to-industry","Applying It to Industry",[15,182,183,184,188,189,193,194,197],{},"The same structure works outside agriculture. In a factory, the measurement context could be sensor data from ",[18,185,187],{"href":186},"\u002Fen\u002Fproducts\u002Fzma-data-acquisition","ZMA"," and ",[18,190,192],{"href":191},"\u002Fen\u002Fproducts\u002Fgdt-digital-transmitter","GDT",", and the corpus could be machine manuals and maintenance logs. When an operator asks ",[24,195,196],{},"\"why did the load curve of press 3 change?\"",", the assistant answers by looking at both the data and the manual.",[10,199,201],{"id":200},"conclusion","Conclusion",[15,203,204,205,69],{},"A good RAG assistant depends less on a big model than on the right context: the model seeing the same numbers as the screen, and reading only relevant sources. For an assistant that works with your own data, see our ",[18,206,208],{"href":207},"\u002Fen\u002Fsolutions\u002Findustrial-ai","Industrial AI solution",[147,210,212],{"id":211},"related-posts","Related Posts",[214,215,216,222,227,233],"ul",{},[46,217,218],{},[18,219,221],{"href":220},"\u002Fen\u002Fblog\u002Fon-premise-ai-solutions-with-ollama","On-Premise AI Solutions with Ollama",[46,223,224],{},[18,225,226],{"href":20},"PlantFarm Scan: Per-Tree Plant Health from Drone Imagery, Built with GETEK",[46,228,229],{},[18,230,232],{"href":231},"\u002Fen\u002Fglossary\u002Frag","Glossary: RAG",[46,234,235],{},[18,236,238],{"href":237},"\u002Fen\u002Fglossary\u002Fembedding","Glossary: Embeddings and Vector Search",{"title":240,"searchDepth":241,"depth":241,"links":242},"",2,[243,244,245,246,252,253],{"id":12,"depth":241,"text":13},{"id":37,"depth":241,"text":38},{"id":75,"depth":241,"text":76},{"id":144,"depth":241,"text":145,"children":247},[248,250,251],{"id":149,"depth":249,"text":150},3,{"id":160,"depth":249,"text":161},{"id":172,"depth":249,"text":173},{"id":179,"depth":241,"text":180},{"id":200,"depth":241,"text":201,"children":254},[255],{"id":211,"depth":249,"text":212},"How we built an on-premise AI assistant that reads measurement data and literature together: Ollama, embeddings, corpus selection and the pitfalls we hit.","md",{"date":259,"author":260,"readTime":261,"tags":262,"image":268,"translation":269},"2026-10-29","Amazeng Technical Team",7,[263,264,265,82,266,267],"Industrial AI","LLM","RAG","Artificial Intelligence","PlantFarm","\u002Fsolutions\u002Fcloud\u002Fshowcase-ollama.webp","yerel-llm-ve-rag-ile-agronomi-asistani",true,"\u002Fen\u002Fblog\u002Flocal-llm-rag-agronomy-assistant",{"title":5,"description":256},"en\u002Fblog\u002Flocal-llm-rag-agronomy-assistant","JKk4eS-LwINRpPmAVPKQEVGT0xO2zlMZRY2TOy8g7qg",1793875325611]