Skip to content
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

chore: nicer message string for sql-syntax scorer #142

Merged
merged 5 commits into from
Apr 16, 2024
Merged
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
5 changes: 5 additions & 0 deletions .changeset/tall-meals-smile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@empiricalrun/scorer": patch
---

chore: improve message string for valid sql-syntax
5 changes: 2 additions & 3 deletions apps/web/components/ui/page-header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ export function PageHeader() {
</section>
<Separator orientation="vertical" className=" h-6" />
<div className="flex w-full flex-1 ml-2">
<span className=" text-sm">
compare and evaluate multiple AI model completions on different
prompts and model
<span className=" text-sm text-muted-foreground">
Compare and evaluate AI models across all the scenarios that matter
</span>
</div>
</header>
Expand Down
2 changes: 1 addition & 1 deletion examples/spider/empiricalrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
{
"type": "model",
"provider": "google",
"model": "gemini-1.5-pro-latest",
"model": "gemini-1.0-pro",
"prompt": "You are an SQLite expert who can convert natural language questions to SQL queries for the database schema given below.\n\nDatabase schema:\n{{schema}}\n\nAnswer the following question with only the SQL query.\n\nQuestion: {{question}}",
"scorers": [
{
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/bin/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const outputFilePath = `${cwd}/${cacheDir}/${outputFileName}`;
program
.name("Empirical.run CLI")
.description(
"CLI to compare and evaluate multiple AI model completions on different prompts and models",
"CLI to compare and evaluate AI models across all the scenarios that matter",
)
.version(packageJSON.version);

Expand Down
4 changes: 2 additions & 2 deletions packages/scorer/src/provider/deterministic/sql.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ test("sql-syntax works with backticks", async () => {
{
score: 1,
name: "sql-syntax",
message: "",
message: "Output is valid SQL",
},
]);
});
Expand Down Expand Up @@ -85,7 +85,7 @@ WHERE stadium_id = (
{
score: 1,
name: "sql-syntax",
message: "",
message: "Output is valid SQL",
},
]);
});
Expand Down
2 changes: 1 addition & 1 deletion packages/scorer/src/provider/deterministic/sql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const checkSqlSyntax: ScoringFn = async ({ output }) => {
{
score: isSQLQuery ? 1 : 0,
name: syntaxName,
message: isSQLQuery ? "" : errorMsg,
message: isSQLQuery ? "Output is valid SQL" : errorMsg,
},
];
};
Expand Down