Separate planned queries from executed queries
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
Bắt đầu bằng cách lần theo OverallState và các node generate_query, web_research và reflection để xem search_query được ghi và đếm ở đâu. So sánh việc tách các state-key được đề xuất với cách tiếp cận dùng counter, sau đó xác minh rằng các query dự kiến vẫn khác biệt với các query đã thực thi và reflection báo cáo số lượng thực sự đã chạy.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description of the feature request:
If I understand correctly, currently both generate_query and web_research nodes write to the same search_query key in OverallState, which is declared as:
search_query: Annotated[list, operator.add]
Because of the operator.add reducer, this causes search_query to accumulate both the original planned queries and the queries that have been executed, leading to duplication.
We should probably separate the concepts of planned queries and executed queries in state management.
What problem are you trying to solve with this feature?
This design makes len(state["search_query"]) misleading, since it double-counts queries (planned + executed).
In the current flow:
-
generate_query sets
search_query = ["q1", "q2", "q3"] -
Each
web_researchbranch appends its own query:["q1", "q2", "q3", "q1", "q2", "q3"] -
Reflection calculates:
number_of_ran_queries = len(state["search_query"])(6, but only 3 actually ran) -
This inflated number is used to offset IDs for follow-up queries. Although because IDs remain unique, the count is actually incorrect. It works but any future logic relying on an accurate count will be wrong.
Any other information you'd like to share?
Two possible solutions:
1) Separate state keys
-
planned_queries: Annotated[list[str], operator.add]-> updated bygenerate_queryand follow-up generation -
executed_queries: Annotated[list[str], operator.add]-> updated byweb_research -
number_of_ran_queries = len(state.get("executed_queries", []))
2) Keep one list but stop re-adding in web_research
-
Remove
search_querywrite fromweb_research -
Add a
ran_count: Annotated[int, operator.add]counter instead -
Reflection uses
ran_count
- Ngôn ngữ chính
- Jupyter Notebook
- Star
- 18.4k
- Fork
- 3.1k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của google-gemini/gemini-fullstack-langgraph-quickstart
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 84/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
-
The field types in the state diagram do not matchCó thể đã có người làm @Benny45123 đã nhận 66 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 55/100
google-gemini/gemini-fullstack-langgraph-quickstart#221 · 1 bình luận ·
-
## Code ReviewĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 55/100
Tất cả issue của google-gemini/gemini-fullstack-langgraph-quickstart
Issue tương tự
-
agent-reported bug from-app needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
nightly-labs/openbot#19144 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
WingedGuardian/GENesis-AGI#5188 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
runPowerShell description does not warn that a nested powershell -Command can report a false exit 1Đang mởagent backend bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 92/100
fritzprix/libr-agent#3121 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
mattpocock/skills#1503 ·
Maintainer thường phản hồi trong vòng 1 ngày