Ironclad / rivet

The open-source visual AI programming environment and TypeScript library
https://rivet.ironcladapp.com
MIT License
2.56k stars 226 forks source link

[Feature]: Retrieval Augmented Generation for function calling #145

Open andraz opened 9 months ago

andraz commented 9 months ago

Feature Request

As demonstrated in this video https://youtu.be/QMaWfbosR_E there is a potential to use Retrieval Augmented Generation to redirect LLM calls to our own functions for specific use cases, where LLM could fail to respond correctly (for example a web search, a hard math calculation or a fresh summary of URL contents)

How could we achieve this feature in the spirit of Rivet?

We could have a block for:

routed into block for:

routed into multiple blocks for:

Code of Conduct

andraz commented 9 months ago

Extra video for RAG use on Llama 2: https://youtu.be/ypzmPwLH_Q4

abrenneke commented 9 months ago

Hey @andraz, RAG should be supported in Rivet with the existing nodes - you just have to set up the chains yourself is all.

By "a block for text to train alternative RAG paths on LLM" do you mean like the Vector KNN node that find the KNN given an input vector?

routed into multiple blocks for function calls

This should be achievable using the Match node right now.