Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not All Tasks Support Conversation Memory #495

Open
collindutter opened this issue Dec 12, 2023 · 1 comment
Open

Not All Tasks Support Conversation Memory #495

collindutter opened this issue Dec 12, 2023 · 1 comment

Comments

@collindutter
Copy link
Member

Some of the Task types (Query, Summary, Extract) are missing integration with Conversation Memory since they don't operate off a Prompt Stack. This makes implementing something like conversational RAG (with Tasks, not Tools) challenging since the history of the conversation is not persisted. Some open ended questions:

  1. Should Engines take in a Prompt Stack? Right now they operate on a single text input, introducing Prompt Stacks might overcomplicate the role of an Engine.
  2. If we do somehow integrate Prompt Stacks into Engines, should other Tasks (Prompt, Tool, Toolkit) be refactored to use Engines? I.e. PromptEngine, ToolEngine, etc.
@collindutter
Copy link
Member Author

collindutter commented Dec 13, 2023

This originally came from the need for TextQueryTask needing to access Conversation Memory so that it could query with more context. Though we can accomplish something similar with the the following:

pipeline = Pipeline(
    tasks=[
        PromptTask(
            "How would you ask the question considering the previous conversation: {{ args[0] }}",
            rules=[Rule(value="Answer only with the new question.")],
        ),
        TextQueryTask(
            "{{ parent_output }}",
            query_engine=vector_query_engine,
        ),
    ],
)

Furthermore, adding Prompt Stack to Summary and Extraction Tasks introduces challenges with their recursive nature. So does it make sense to introduce the Prompt Stack to these utility oriented Tasks? Or should they always be complemented with a Prompt Task?

CC @andrewfrench @vasinov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant