Skip to content

Commit

Permalink
Merge branch 'updates_to_pipeline' into multi_turn_chat
Browse files Browse the repository at this point in the history
  • Loading branch information
poornimaramesh committed Aug 23, 2024
2 parents e6a3ea5 + a11d3fa commit 0842558
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions askametric/query_processor/query_processing_prompts.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ def create_sql_generating_prompt(
Always use the query metadata to construct the SQL query.
For complex queries involving UNION and ORDER BY, use the following
and replicate its structure EXACTLY.
For complex queries involving UNION and ORDER BY,
use the following and replicate its structure EXACTLY.
Example:
For a query like "What are the best-performing and worst-performing districts on
indicator A?":
Expand Down
2 changes: 1 addition & 1 deletion askametric/query_processor/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ async def get_common_column_values(
result[table] = {}
for column in columns:
query = f"""
SELECT DISTINCT({column})
SELECT {column}, COUNT(*)
FROM {table}
GROUP BY {column}
ORDER BY COUNT(*) DESC
Expand Down

0 comments on commit 0842558

Please sign in to comment.