From 44ea5199f243d7c51019acc5e5c5341875b184e7 Mon Sep 17 00:00:00 2001 From: Szymon Dudycz Date: Thu, 22 Aug 2024 15:54:50 +0200 Subject: [PATCH] Separate REST server from question answerer (#7176) Co-authored-by: berkecanrizai <63911408+berkecanrizai@users.noreply.github.com> GitOrigin-RevId: ec84c6e9f2be188c14b1fbf8e8105ae8678918f8 --- examples/pipelines/adaptive-rag/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/pipelines/adaptive-rag/README.md b/examples/pipelines/adaptive-rag/README.md index c9758d6..40fce00 100644 --- a/examples/pipelines/adaptive-rag/README.md +++ b/examples/pipelines/adaptive-rag/README.md @@ -21,9 +21,9 @@ BaseRAGQuestionAnswerer is the base class to build RAG applications with Pathway It is meant to get you started with your RAG application right away. Here, we extend the `BaseRAGQuestionAnswerer` to implement the adaptive retrieval and reply to requests in the endpoint `/v1/pw_ai_answer`. -Since we are interested in changing the behavior and logic of the RAG, we only modify `pw_ai_query` function that handles all this logic, and then replies to the post request. +Since we are interested in changing the behavior and logic of the RAG, we only modify `answer` function that handles all this logic, and then replies to the post request. -`pw_ai_query` function takes the `pw_ai_queries` table as the input, this table contains the prompt, and other arguments coming from the post request, see the `BaseRAGQuestionAnswerer` class and defined schemas to learn more about getting inputs with post requests. +`answer` function takes the `pw_ai_queries` table as the input, this table contains the prompt, and other arguments coming from the post request, see the `BaseRAGQuestionAnswerer` class and defined schemas to learn more about getting inputs with post requests. We use the data in this table to call our adaptive retrieval logic. To do that, we use `answer_with_geometric_rag_strategy_from_index` implementation provided under the `pathway.xpacks.llm.question_answering`.