Find answers from the community

Updated 2 months ago

Retrieval transform

anyone know how one can apply a simple transform to a prompt before retrieval, but use the actual prompt for LLM generation?
L
m
2 comments
I think you can probably create a custom retriever for this

You can do anything you want, as long as the retriever returns a list of nodes

This example is slightly different, but the general outline is the same

https://gpt-index.readthedocs.io/en/latest/examples/query_engine/CustomRetrievers.html#define-custom-retriever
great pointer! this should do it, thank you!
Add a reply
Sign up and join the conversation on Discord