RAG is working, but how to directly query an FAISS knowledge bank?

Neil_B Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 9 ✭✭✭✭

Hi All,

We're currently running version 12.3.2 and have had some good success setting up an LLM flow using the public preview recipes. I've got a corpus of text going through the embeddings recipe and generating an FAISS knowledge bank. I've been able to use retrieval augmented generation against the knowledge bank using a prompt recipe. All of this is working great.

What I'd like to understand is, how can I simply query against this knowledge bank for nearest neighbors? I know that when i run the prompt recipe, the 5 nearest neighbors are being retrieved and passed to the LLM as context, and are also cited in the output. If I have a new text string and simply want to retrieve and output the 5 nearest neighbors and their associated document chunks from the knowledge bank, without passing them back to the LLM as part of a prompt, how can I do this? Can anyone provide a python example?

Additionally, for the dataiku folks, will we eventually have another recipe allowing us to do this?



Setup Info
      Help me…