Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

0006_harsh_caretaker.sql 1.5 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
  1. CREATE TABLE `eval_results` (
  2. `id` text PRIMARY KEY NOT NULL,
  3. `created_at` integer DEFAULT CURRENT_TIMESTAMP NOT NULL,
  4. `updated_at` integer DEFAULT CURRENT_TIMESTAMP NOT NULL,
  5. `eval_id` text NOT NULL,
  6. `prompt_idx` integer NOT NULL,
  7. `test_case_idx` integer NOT NULL,
  8. `test_case` text NOT NULL,
  9. `prompt` text NOT NULL,
  10. `prompt_id` text,
  11. `provider` text NOT NULL,
  12. `provider_id` text,
  13. `latency_ms` integer,
  14. `cost` real,
  15. `response` text,
  16. `error` text,
  17. `success` integer NOT NULL,
  18. `score` real NOT NULL,
  19. `grading_result` text,
  20. `named_scores` text,
  21. `metadata` text,
  22. FOREIGN KEY (`eval_id`) REFERENCES `evals`(`id`) ON UPDATE no action ON DELETE no action,
  23. FOREIGN KEY (`prompt_id`) REFERENCES `prompts`(`id`) ON UPDATE no action ON DELETE no action,
  24. FOREIGN KEY (`provider_id`) REFERENCES `providers`(`id`) ON UPDATE no action ON DELETE no action
  25. );
  26. --> statement-breakpoint
  27. CREATE TABLE `evals_to_providers` (
  28. `provider_id` text NOT NULL,
  29. `eval_id` text NOT NULL,
  30. PRIMARY KEY(`provider_id`, `eval_id`),
  31. FOREIGN KEY (`provider_id`) REFERENCES `providers`(`id`) ON UPDATE no action ON DELETE no action,
  32. FOREIGN KEY (`eval_id`) REFERENCES `evals`(`id`) ON UPDATE no action ON DELETE no action
  33. );
  34. --> statement-breakpoint
  35. CREATE TABLE `providers` (
  36. `id` text PRIMARY KEY NOT NULL,
  37. `provider_id` text NOT NULL,
  38. `options` text NOT NULL
  39. );
  40. --> statement-breakpoint
  41. ALTER TABLE `evals` ADD `prompts` text;--> statement-breakpoint
  42. CREATE INDEX `eval_result_eval_id_idx` ON `eval_results` (`eval_id`);
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...