Build a Retrieval-Augmented Generation (RAG) application using Pulsejet and Ollama
client.insert_single(collection_name, embedding, meta)
to insert each document chunk’s embedding and metadata into Pulsejet.insert_single
method efficiently stores the vector (embedding) along with its associated metadata.client.search_single(collection_name, query_embedding, limit=limit, filter=None)
to find similar documents.ollama.embeddings(model=EMBEDDING_MODEL, prompt=text)
to generate embeddings for both documents and queries.ollama.generate(model=LLM_MODEL, prompt=prompt)
to generate answers based on the retrieved context.ensure_collection_exists()
function checks if the collection already exists before attempting to create it, avoiding unnecessary operations."files/"
with the path to your document folder. If you want to use the Art Deco building files, download them from the rag_art_deco GitHub repository and place them in your files2/
folder.