Skip to content

Commit

Permalink
Separate REST server from question answerer (#7176)
Browse files Browse the repository at this point in the history
Co-authored-by: berkecanrizai <[email protected]>
GitOrigin-RevId: ec84c6e9f2be188c14b1fbf8e8105ae8678918f8
  • Loading branch information
2 people authored and Manul from Pathway committed Aug 22, 2024
1 parent 97f8ac2 commit 44ea519
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/pipelines/adaptive-rag/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down

0 comments on commit 44ea519

Please sign in to comment.