Skip to content

theshapguy/rag-elixir

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Agents

To start a embedding process on a new document after the link or reader has been changed run

mix reset_and_start

To prompt on the same document & embedding, just run

iex -S mix

# To start the embedding process (this is syncronous)
Agents.Hello.chunk_document()

# After the above is done prompting can be done
Agents.Hello.prompt("what are the risks of reddit?")

# Make sure to run the chuck document step otherwise you'll get an error

# Everything useful related to this project is located at
# - [lib/agents/hello.ex](https://github.com/theshapguy/rag-elixir/blob/main/lib/agents/hello.ex)
# - application.ex
# chunking, embedding, querying, prompting

# You will require Ollama to prompt using this code, however if you are familer with the OpenAI API, changing to it is just changing a few lines of code.

# Using this phoenix project so that I can expand on this later

To start your Phoenix server:

  • Run mix setup to install and setup dependencies
  • Start Phoenix endpoint with mix phx.server or inside IEx with iex -S mix phx.server

Now you can visit localhost:4000 from your browser.

Ready to run in production? Please check our deployment guides.

Learn more

About

Implementing RAG using Elixir and Ollama

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages