-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
28 additions
and
17 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.mode csv | ||
.headers on | ||
|
||
SELECT queries.id, queries.query_time, queries.language, queries.code, queries.error, queries.issue, json_extract(queries.response_text, '$.main') as main_response, json_extract(queries.response_text, '$.insufficient') as insufficient_response | ||
FROM queries | ||
JOIN roles ON queries.role_id = roles.id | ||
WHERE query_time > date("2023-09-30") -- only once it was in use in real classes | ||
AND roles.role = "student" -- only queries from students in a class | ||
ORDER BY RANDOM() | ||
LIMIT 100; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.mode box | ||
SELECT | ||
AVG(Prompt) AS Prompt_avg, | ||
AVG(Completion) AS Completion_avg | ||
FROM ( | ||
SELECT | ||
q.id, | ||
SUM(json_extract(value, '$.usage.prompt_tokens')) AS "Prompt", | ||
SUM(json_extract(value, '$.usage.completion_tokens')) AS "Completion" | ||
FROM queries AS q, json_each(q.response_json, '$') | ||
WHERE json_valid(value) | ||
GROUP BY q.id | ||
ORDER BY q.id DESC | ||
LIMIT 10000 | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters