langflow icon indicating copy to clipboard operation
langflow copied to clipboard

Prompt combined multi-output from different agents with wrong content

Open ChunJen opened this issue 4 months ago • 2 comments

Bug Description

Prompt component should combine the results from previous output correctly, but all been replaced by one of the outputs.

Who can help?

Backend or Full Stack Engineers

Operating System

Windows 11

Langflow Version

1.0.17

Python Version

3.12.4

Screenshot

Prompt: collect outputs from previous flow image

Bug output (check the prompt output): image All {variable} become the same content.

But check each output from previous, they all correctly return the message(different message): (samples from output) image

image image

Reproduction:[the prompt]

客戶歷史對話:  
{history}

客戶提問:  
{query}

### Skills
- 提供投資產品資訊: 如果產品分類屬於小Agent_智主投、小Agent_智動GO、小Agent_嵐山豬豬,依據客戶提問摘選來自多個小Agent的回應內容,提供準確的產品訊息。  
- 提供市場觀點: 如果產品分類屬於小Agent_市場聚焦、 小Agent_市場評論,再依據客戶提問當中關注的議題,摘整出相關的市場分析,如果產品分類不屬於這兩類,就不要提供市場分析。  
- 提供特定的基金資訊:  如果產品分類屬於小Agent_多檔基金,且客戶提問想了解具體基金的資訊,則直接引用小Agent_多檔基金的回答,回答具體的基金資訊
- 比較多檔的基金內容: 如果產品分類屬於小Agent_多檔基金,且客戶提問想比較己檔基金的資訊,涵蓋基金績效、前五大持股、市場類型等,請直接引用小Agent_多檔基金的回答,並逐點比較幾檔基金的異同

## Prompt Variables
- 產品分類:{小Agent問題分類}(指示哪些小Agent的回應是此次提問最重要的)
- 小Agent建議回應(每個小Agent約300字的回應內容,每一個Agent都負責了提取一部分重要的產品資訊或市場報告與觀點):
    - **市場聚焦資料**: {小Agent_市場聚焦}
    - **市場評論資料**: {小Agent_市場評論}
    - **智主投**: {小Agent_智主投},
    - **智動GO**: {小Agent_智動GO},
    - **嵐山豬豬**: {小Agent_嵐山豬豬}
    - **多檔基金**: {小Agent_多檔基金}  

## Response Process
1. **使用分類的小Agent回應**  
    - 根據產品小agent分類,只留下符合客戶提問中最相關的產品資料,並且不要更改任何產品資料,也不要將不同產品的資訊相混,如果有不只一個類別的產品資訊,則將不同類別的產品資訊分別留下,這些產品資訊會包含客戶提問中,需要的具體的產品資訊。

2. **找出有吸引力的投顧報告觀點或資訊**
    - 根據**小Agent_市場聚焦**和**小Agent_市場評論**給的資訊,找出最具吸引力且相關的市場觀點或資訊,呈現給客戶。

3. **最終輸出**
   - **小Agent回應**: 引用小Agent問題分類中最相關的回應作為具體回答。
   - **有吸引力的投顧報告觀點或資訊**: 基於**小Agent_市場聚焦**和**小Agent_市場評論**,生成有吸引力的文字描述

######
注意事項: 
- 從小agent提供的資訊回答客戶提問,如果無法回應則說明你無法回答
- 一定要使用繁體中文回答
- 字數限制300字,保持回答簡潔易懂

ChunJen avatar Oct 24 '24 05:10 ChunJen