Dynamic example selection #537
Replies: 2 comments 2 replies
-
|
Oh interesting. We're in the process of adding RAG now, which is similar in tooling (embeddings/search/tools). It would be possible to do something similar with tools+RAG, although you'd need to load the examples into documents in our initial version; it can't automatically pull from the dataset and filter to highly rated like we do for prompt gen. We could add that in a future version, and it does make sense. @leonardmq possible extension to your work for future iteration. @aryamccarthy I wouldn't suggest jumping into the RAG/index branches quite yet, they are changing often. I'd probably suggest implementing as a tool vs prompt generator (like you say, monkey patching will be needed, not setup for that). Basically a "fetch_examples(input)" tool that can add N relevant examples to the context. Tool calling isn't in main yet, but it's a lot closer (the |
Beta Was this translation helpful? Give feedback.
-
|
Really interesting stuff now that the Looking into it, I'm curious about a few things.
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
When doing ICL, sometimes there's reason to select amongst the five-star options based on similarity to the input; it can lead to better performance. Is there any interest in creating hooks for this dynamic example selection within the core library?
It'd take some finagling with the existing structure: right now, the input and the prompt are pretty well separated from each other until they're combined in the chat formatter. I'm curious whether there's effort in this direction—I do see some vector store PRs out there.
For my use case, this dynamic selection for ICL would be useful, and I'm going to wind up building it either way. It'd be great to work within the library instead of trying to circumvent it with some odd inheritance/monkeypatching. Grateful for y'all's thoughts!
Beta Was this translation helpful? Give feedback.
All reactions