Tweaked compare_result to work with proper directory, updated rag python notebook prompt and vector stores to increase accuracy
Browse files
src/evaluation/__pycache__/compare_result.cpython-312.pyc
ADDED
|
Binary file (3.75 kB). View file
|
|
|
src/evaluation/compare_result.py
CHANGED
|
@@ -1,6 +1,11 @@
|
|
| 1 |
import math
|
|
|
|
| 2 |
|
| 3 |
def compare_result(sample_query, sample_result, query_output):
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
# Clean model output to only have the query output
|
| 5 |
if query_output[0:8] == "SQLite:\n":
|
| 6 |
query = query_output[8:]
|
|
|
|
| 1 |
import math
|
| 2 |
+
import sqlite3 as sql
|
| 3 |
|
| 4 |
def compare_result(sample_query, sample_result, query_output):
|
| 5 |
+
# Create connection to sqlite3 database
|
| 6 |
+
connection = sql.connect('./nba-data/nba.sqlite')
|
| 7 |
+
cursor = connection.cursor()
|
| 8 |
+
|
| 9 |
# Clean model output to only have the query output
|
| 10 |
if query_output[0:8] == "SQLite:\n":
|
| 11 |
query = query_output[8:]
|
test_rag.ipynb
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|