extended-salmon
extended-salmon2y ago

AI Step with KB + Chunks from Query

I'm trying to store chunks from the Query API in a variable to use it afterwards in the Response AI Step wit KB. For example, lets say i store the content of the chunks from the query in variable called: kb_content afterwards i want to use the Response AI Step with KB to generate an answer with only the kb_content as context. I aldready tried this, but somehow the response gets only generated from the KB and not with kb_content. Is it not possible to do this with the Response AI with KB step? I mean you can also store the memory in a variable and use it as context in the AI with KB step. First I tried this with the Set AI step, but the were a lot of hallucinations, so i wanted to use the Response AI step with KB, to avoid this.
2 Replies
tame-yellow
tame-yellow2y ago
@çiko // Çiğdem are you doing JSON.stringify() for memory or the API response? Before sending to the Set Ai? If not then the variable will only be sent as [] and not the actual content
extended-salmon
extended-salmonOP2y ago
Hi, yes and this is working as expected. The problem was, that the ai response was not using the memory + the extracted chunks to answer the question. Instead it was using the KB. But solved the issue by using the SetAi Step with KB. Somehow this worked better.

Did you find this page helpful?