To make the
GemmaLLM plugin truly useful in your projects, you'll need a way to provide it with relevant knowledge. That's where
ContextSearch comes in.
Instead of sending an entire document to the LLM, ContextSearch uses
Retrieval-Augmented Generation (RAG) to find only the most relevant passages based on the user's prompt. This allows your AI to generate more accurate, context-aware responses while keeping everything
100% on-device.
Features* Generate text embeddings from your documents.
* Index and manage local document collections.
* Perform semantic search using vector similarity.
* Retrieve the most relevant context for any prompt.
* Works completely offline—no internet required.
* Integrates seamlessly with the
GemmaLLM plugin.
Perfect for* Chat with PDFs and documents
* Offline knowledge bases
* Semantic document search
* Private, on-device AI assistants
With
GemmaLLM + ContextSearch, you can build powerful AI applications that understand your own documents without relying on cloud services.
You can install it from this link:
https://drive.google.com/drive/folders/1Gzm073yoO8FUOIkFBJkxosrNVTEvTogp?usp=sharingapp.LoadPlugin("ContextSearch")
function OnStart()
{
ctx = app.LoadContextSearch( onLoad )
}
function onLoad()
{
ctx.AddDocument( app.GetAppPath()+"/sample-docs.txt" )
let prompt = "What is the main topic of the document?"
let context = ctx.GetContext(prompt)
console.log("Prompt:", prompt)
console.log("Context:", context)
}