Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix bad Disambiguation Agent update #151

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

Merged
BenConstable9 merged 3 commits into main from fix/disambiguation-request
Jan 29, 2025
Merged

Fix bad Disambiguation Agent update #151

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion text_2_sql/autogen/src/autogen_text_2_sql/autogen_text_2_sql .py
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def extract_disambiguation_request(
)

request = DismabiguationRequestsPayload.Body.DismabiguationRequest(
agent_question=disambiguation_request["agent_question"],
assistant_question=disambiguation_request["assistant_question"],
user_choices=disambiguation_request["user_choices"],
)
request_payload.body.disambiguation_requests.append(request)
Expand Down
2 changes: 1 addition & 1 deletion text_2_sql/text_2_sql_core/src/text_2_sql_core/payloads/inte raction_payloads.py
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class PayloadBase(InteractionPayloadBase):
class DismabiguationRequestsPayload(InteractionPayloadBase):
class Body(InteractionPayloadBase):
class DismabiguationRequest(InteractionPayloadBase):
ASSISTANT_question: str | None = Field(..., alias="ASSISTANTQuestion")
assistant_question: str | None = Field(..., alias="AssistantQuestion")
user_choices: list[str] | None = Field(default=None, alias="userChoices")

disambiguation_requests: list[DismabiguationRequest] | None = Field(
Expand Down
14 changes: 7 additions & 7 deletions ...2_sql_core/src/text_2_sql_core/prompts/disambiguation_and _sql_query_generation_agent.yaml
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ system_message:
{
\"disambiguation_requests\": [
{
\"agent_question\": \"I'm sorry, I couldn't find any relevant database schemas for your request about [REQUEST TYPE]. I focus on providing answers in the context of the use case. Could you please provide more context or rephrase your question?\",
\"assistant_question\": \"I'm sorry, I couldn't find any relevant database schemas for your request about [REQUEST TYPE]. I focus on providing answers in the context of the use case. Could you please provide more context or rephrase your question?\",
\"user_choices\": []
}
]
Expand All @@ -183,14 +183,14 @@ system_message:
{
\"disambiguation_requests\": [
{
\"agent_question\": \"Did you mean the 'Customer Name' column or the 'Client Name' column?\",
\"assistant_question\": \"Did you mean the 'Customer Name' column or the 'Client Name' column?\",
\"user_choices\": [
\"Customer Name\",
\"Client Name\"
]
},
{
\"agent_question\": \"Which sort of bike do you mean?\",
\"assistant_question\": \"Which sort of bike do you mean?\",
\"user_choices\": [
\"Mountain Bike\",
\"Road Bike\"
Expand All @@ -208,7 +208,7 @@ system_message:
{
\"disambiguation_requests\": [
{
\"agent_question\": \"Could you please rephrase your question or provide more context? I'm having trouble understanding the specifics of your request.\",
\"assistant_question\": \"Could you please rephrase your question or provide more context? I'm having trouble understanding the specifics of your request.\",
\"user_choices\": []
}
]
Expand All @@ -223,7 +223,7 @@ system_message:
{
\"disambiguation_requests\": [
{
\"agent_question\": \"Could you clarify the details of your request so I can assist you better?\",
\"assistant_question\": \"Could you clarify the details of your request so I can assist you better?\",
\"user_choices\": []
}
]
Expand Down Expand Up @@ -262,11 +262,11 @@ system_message:
{
\"disambiguation_requests\": [
{
\"agent_question\": \"\",
\"assistant_question\": \"\",
\"user_choices\": [\"\", \"\"]
},
{
\"agent_question\": \"\",
\"assistant_question\": \"\",
\"user_choices\": [\"\", \"\"]
}
]
Expand Down
Loading