-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Results of intermediate PromptNodes
in a Multi-PromptNode
-Pipelines are burried
#3878
Comments
We'll do this @tstadel thanks for bringing this request to our attention |
Since this issue was opened we made some changes to the PromptNode api, and I would argue that the intermediate output is not buried anymore. This is the current output from the pipeline run: {
'results': ['Berlin.'],
'invocation_context': {'questions': ['What is the capital of Germany?']},
'questions': ['What is the capital of Germany?'],
'root_node': 'Query',
'params': {},
'query': 'not relevant',
'documents': [<Document: {'content': 'Berlin is the capital of Germany', 'content_type': 'text', 'score': None, 'meta': {}, 'embedding': None, 'id': '51b1f05adecc6e656d68af93cc40bd9c'}>],
'node_id': 'prompt_node_2'
} The PR linked would produce this instead: {
'results': ['Berlin'],
'invocation_context': {'questions': ['What is the capital of Germany?']},
'questions': ['What is the capital of Germany?'],
'root_node': 'Query',
'params': {},
'query': 'not relevant',
'documents': [<Document: {'content': 'Berlin is the capital of Germany', 'content_type': 'text', 'score': None, 'meta': {}, 'embedding': None, 'id': '51b1f05adecc6e656d68af93cc40bd9c'}>],
'node_id': 'prompt_node_2'
} In my opinion having @tstadel if you still think we should move the key up to the root @vblagoje PR looks good to me, otherwise I would leave the code as is. |
I would disagree on the point that the current version is more clear. Especially when reading the docstrings of |
Describe the bug
Currently it's not possible to access easily the output of multiple
PromptNodes
that are chained together.E.g. the code from the docs using a "question-generation" and a "question-answering" PromptNode in sequence only returns the answers as
results
, but the questions (which are a intermediate result) are burried insidePromptNode
'sinvocation_context
:would produce something like this.
["Berlin"]
while the question to the answer is burried under
output["meta"]["invocation_context"]["questions"]
Expected behavior
questions
andanswers
can be easily accessed together, e.g. by exposingPromptNode
'soutput_variable
on the root level of node_output.FAQ Check
The text was updated successfully, but these errors were encountered: