Skip to content

Add notebook on RAG - #353

Merged
jonatanklosko merged 3 commits into
elixir-nx:mainfrom
nyo16:add-simple-rag
Feb 27, 2024
Merged

Add notebook on RAG#353
jonatanklosko merged 3 commits into
elixir-nx:mainfrom
nyo16:add-simple-rag

Conversation

@nyo16

@nyo16 nyo16 commented Feb 27, 2024

Copy link
Copy Markdown
Contributor

I built a simple rag pipeline end to end with hnswlib, mistral and gte-small. I used paul graham essay text as my source.

Comment thread notebooks/simple_rag.livemd Outdated

IO.inspect(String.length(resp.body))

# Our model has dim 384 and max seq length 512.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nyo16 note that the sequence length is how many input tokens the model accepts. Each token is a couple characters, usually a word :) We get the tokens by passing the text through the tokenizer.

@jonatanklosko jonatanklosko left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nyo16 thanks you, this is a great addition to the docs! I made some changes to remove some verbose outputs and I added a bit more step by step descriptions :)

@jonatanklosko jonatanklosko changed the title Simple Rag notebook. Add notebook on RAG Feb 27, 2024
@jonatanklosko
jonatanklosko merged commit 22b09ac into elixir-nx:main Feb 27, 2024
@nyo16

nyo16 commented Feb 27, 2024

Copy link
Copy Markdown
Contributor Author

@jonatanklosko thank you so much for the edits! I am not publish often and i am a bit rusty! Also I learned a tone from your edits how to format it for the next time!

@nyo16
nyo16 deleted the add-simple-rag branch October 6, 2025 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants