RAG (Retrieval Augmented Generation) implementation using LangChain and Ollama.
- Download Ollama from the official download page
- Install Ollama
- Open a terminal and type
ollama pull llama3
At this point, Ollama should be ready for use. To verify that everything has been set up correctly, you can:
- Open the web page http://localhost:11434/, which should display
Ollama is running - Execute the command
ollama listin the terminal, which should return thellama3:latestrecord
- Ensure Ollama is up and running
- Run
npm ci - Run
npm run start
Note: As implemented, the AI-generated text in this example is non-deterministic; therefore, it is possible that the responses you receive may differ from those obtained by others. That said, if implemented well, the RAG algorithm should still consistently demonstrate the difference between a response generated without specific knowledge of the context and one with context-awareness.