DEV Community

Dalmas Chituyi
Dalmas Chituyi

Posted on

1

RAG vs SELF-RAG

What RAG does is, btw RAG is rigid in how it considers retrieving the information in order to generate context using some sort of document similarity algorithm. So, 😊 RAG will retrieve information even if it doesn’t have to do it. It immediately assumes the LLM lacks learnt embeddings to make sense of a prompt by the user and that’s why it first generates features from a domain specific corpus and adds it as context to the LLM prompt without considering the LLM might have the most relevant context in the first place (Obviously, this is an implementation detail that as Self-RAG attempts to address). How do we ask the LLM this question before tuning its response with an external source? Inasmuch as RAG is a good way to add relevance to LLMs especially using enterprise data, augmenting RAG with the intelligence to know when to retrieve or not will reduce the impact of verbiage output. Unlike a widely adopted Retrieval-Augmented Generation approach, Self-RAG retrieves on demand and criticize its own generation.

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay