{"sql": "SELECT VERSION()", "response": [{"columns": [{"version()": {"type": "string"}}], "data": [{"version()": "29.9.0 58e88d5ab@26091108 (columnar 14.2.1 cb282a2@26090615) (secondary 14.2.1 cb282a2@26090615) (knn 14.2.1 cb282a2@26090615) (embeddings 1.1.1 cb282a2@26090615)"}], "total": 1, "error": "", "warning": ""}]}
{"sql": "CREATE TABLE docs(title TEXT, body TEXT, code STRING, vec FLOAT_VECTOR KNN_TYPE='hnsw' HNSW_SIMILARITY='cosine' MODEL_NAME='Xenova/all-MiniLM-L6-v2' FROM='title,body')", "response": [{"total": 0, "error": "", "warning": ""}]}
{"sql": "INSERT INTO docs(id,title,body,code) VALUES (1,'E1042: Connection pool exhausted','All database connections are checked out. A request waits until the acquisition deadline expires. Close leaked sessions, shorten transactions, or reduce concurrent workers before increasing the pool size.','E1042')", "response": [{"total": 1, "error": "", "warning": ""}]}
{"sql": "INSERT INTO docs(id,title,body,code) VALUES (2,'E1043: Database connection refused','The TCP connection was rejected before a session opened. Verify that the database process is listening on the configured host and port. Increasing the connection pool will not start a stopped server.','E1043')", "response": [{"total": 1, "error": "", "warning": ""}]}
{"sql": "INSERT INTO docs(id,title,body,code) VALUES (3,'E2041: Certificate hostname mismatch','TLS verification failed because the server certificate does not cover the requested hostname. Connect using the DNS name in the certificate or issue a replacement certificate with the correct subject alternative name.','E2041')", "response": [{"total": 1, "error": "", "warning": ""}]}
{"sql": "INSERT INTO docs(id,title,body,code) VALUES (4,'E2042: Certificate expired','TLS verification failed because the certificate validity period has ended. Renew the certificate and reload the service. Changing the hostname does not extend the validity period.','E2042')", "response": [{"total": 1, "error": "", "warning": ""}]}
{"sql": "INSERT INTO docs(id,title,body,code) VALUES (5,'E3010: Disk quota exceeded','The service cannot write another segment because its storage allocation is full. Remove obsolete snapshots or increase the volume quota. Retrying the write without freeing space will fail again.','E3010')", "response": [{"total": 1, "error": "", "warning": ""}]}
{"sql": "INSERT INTO docs(id,title,body,code) VALUES (6,'E3011: Read-only filesystem','The storage mount rejects writes even when free space remains. Inspect mount flags and kernel logs for filesystem errors before remounting. Increasing the disk quota does not make a read-only mount writable.','E3011')", "response": [{"total": 1, "error": "", "warning": ""}]}
{"sql": "INSERT INTO docs(id,title,body,code) VALUES (7,'E4010: Access token expired','The API rejects an access token after its expiration timestamp. Obtain a new token through the refresh flow and retry the request. Do not log the token value.','E4010')", "response": [{"total": 1, "error": "", "warning": ""}]}
{"sql": "INSERT INTO docs(id,title,body,code) VALUES (8,'E4011: Permission denied','The authenticated account lacks permission for this operation. Ask an administrator to grant the required role. Refreshing an otherwise valid token does not add privileges.','E4011')", "response": [{"total": 1, "error": "", "warning": ""}]}
{"sql": "INSERT INTO docs(id,title,body,code) VALUES (9,'E5010: Replica lag above threshold','A read replica has not applied recent changes from the primary. Check replication health and route read-after-write requests to the primary until the replica catches up.','E5010')", "response": [{"total": 1, "error": "", "warning": ""}]}
{"sql": "INSERT INTO docs(id,title,body,code) VALUES (10,'E5011: Query deadline exceeded','A database query ran longer than the configured execution timeout. Inspect its execution plan and indexes. Raising the deadline can hide an expensive scan and increase resource use.','E5011')", "response": [{"total": 1, "error": "", "warning": ""}]}
{"sql": "SELECT COUNT(*) AS n FROM docs", "response": [{"columns": [{"n": {"type": "long long"}}], "data": [{"n": 10}], "total": 1, "error": "", "warning": ""}]}

CASE: code only
{"sql": "SELECT id,title,weight() AS score FROM docs WHERE MATCH('E1042') ORDER BY score DESC,id ASC LIMIT 3", "response": [{"columns": [{"id": {"type": "long long"}}, {"title": {"type": "string"}}, {"score": {"type": "long long"}}], "data": [{"id": 1, "title": "E1042: Connection pool exhausted", "score": 1718}], "total": 1, "error": "", "warning": ""}]}
{"sql": "SELECT id,title,knn_dist() AS distance FROM docs WHERE KNN(vec,10,'E1042') LIMIT 3", "response": [{"columns": [{"id": {"type": "long long"}}, {"title": {"type": "string"}}, {"distance": {"type": "float"}}], "data": [{"id": 1, "title": "E1042: Connection pool exhausted", "distance": 0.60199785}, {"id": 10, "title": "E5011: Query deadline exceeded", "distance": 0.6875298}, {"id": 7, "title": "E4010: Access token expired", "distance": 0.70413136}], "total": 3, "error": "", "warning": ""}]}
{"sql": "SELECT id,title,hybrid_score() AS score FROM docs WHERE MATCH('E1042') AND KNN(vec,10,'E1042') LIMIT 3 OPTION fusion_method='rrf',window_size=10", "response": [{"columns": [{"id": {"type": "long long"}}, {"title": {"type": "string"}}, {"score": {"type": "float"}}], "data": [{"id": 1, "title": "E1042: Connection pool exhausted", "score": 0.03278688}, {"id": 10, "title": "E5011: Query deadline exceeded", "score": 0.01612903}, {"id": 7, "title": "E4010: Access token expired", "score": 0.01587302}], "total": 3, "error": "", "warning": ""}]}
IDS: {"lexical": [1], "vector": [1, 10, 7], "hybrid": [1, 10, 7]}

CASE: paraphrase
{"sql": "SELECT id,title,weight() AS score FROM docs WHERE MATCH('borrow | session | busy') ORDER BY score DESC,id ASC LIMIT 3", "response": [{"columns": [{"id": {"type": "long long"}}, {"title": {"type": "string"}}, {"score": {"type": "long long"}}], "data": [{"id": 2, "title": "E1043: Database connection refused", "score": 1572}], "total": 1, "error": "", "warning": ""}]}
{"sql": "SELECT id,title,knn_dist() AS distance FROM docs WHERE KNN(vec,10,'workers cannot borrow a session because every slot is busy') LIMIT 3", "response": [{"columns": [{"id": {"type": "long long"}}, {"title": {"type": "string"}}, {"distance": {"type": "float"}}], "data": [{"id": 1, "title": "E1042: Connection pool exhausted", "distance": 0.67388809}, {"id": 5, "title": "E3010: Disk quota exceeded", "distance": 0.7005797}, {"id": 6, "title": "E3011: Read-only filesystem", "distance": 0.8074981}], "total": 3, "error": "", "warning": ""}]}
{"sql": "SELECT id,title,hybrid_score() AS score FROM docs WHERE MATCH('borrow | session | busy') AND KNN(vec,10,'workers cannot borrow a session because every slot is busy') LIMIT 3 OPTION fusion_method='rrf',window_size=10", "response": [{"columns": [{"id": {"type": "long long"}}, {"title": {"type": "string"}}, {"score": {"type": "float"}}], "data": [{"id": 2, "title": "E1043: Database connection refused", "score": 0.03154496}, {"id": 1, "title": "E1042: Connection pool exhausted", "score": 0.01639344}, {"id": 5, "title": "E3010: Disk quota exceeded", "score": 0.01612903}], "total": 3, "error": "", "warning": ""}]}
IDS: {"lexical": [2], "vector": [1, 5, 6], "hybrid": [2, 1, 5]}

CASE: code plus symptom
{"sql": "SELECT id,title,weight() AS score FROM docs WHERE MATCH('E1042') ORDER BY score DESC,id ASC LIMIT 3", "response": [{"columns": [{"id": {"type": "long long"}}, {"title": {"type": "string"}}, {"score": {"type": "long long"}}], "data": [{"id": 1, "title": "E1042: Connection pool exhausted", "score": 1718}], "total": 1, "error": "", "warning": ""}]}
{"sql": "SELECT id,title,knn_dist() AS distance FROM docs WHERE KNN(vec,10,'workers cannot borrow a session because every slot is busy') LIMIT 3", "response": [{"columns": [{"id": {"type": "long long"}}, {"title": {"type": "string"}}, {"distance": {"type": "float"}}], "data": [{"id": 1, "title": "E1042: Connection pool exhausted", "distance": 0.67388809}, {"id": 5, "title": "E3010: Disk quota exceeded", "distance": 0.7005797}, {"id": 6, "title": "E3011: Read-only filesystem", "distance": 0.8074981}], "total": 3, "error": "", "warning": ""}]}
{"sql": "SELECT id,title,hybrid_score() AS score FROM docs WHERE MATCH('E1042') AND KNN(vec,10,'workers cannot borrow a session because every slot is busy') LIMIT 3 OPTION fusion_method='rrf',window_size=10", "response": [{"columns": [{"id": {"type": "long long"}}, {"title": {"type": "string"}}, {"score": {"type": "float"}}], "data": [{"id": 1, "title": "E1042: Connection pool exhausted", "score": 0.03278688}, {"id": 5, "title": "E3010: Disk quota exceeded", "score": 0.01612903}, {"id": 6, "title": "E3011: Read-only filesystem", "score": 0.01587302}], "total": 3, "error": "", "warning": ""}]}
IDS: {"lexical": [1], "vector": [1, 5, 6], "hybrid": [1, 5, 6]}

CASE: certificate paraphrase
{"sql": "SELECT id,title,weight() AS score FROM docs WHERE MATCH('secure | identity | wrong') ORDER BY score DESC,id ASC LIMIT 3", "response": [{"columns": [{"id": {"type": "long long"}}, {"title": {"type": "string"}}, {"score": {"type": "long long"}}], "data": [], "total": 0, "error": "", "warning": ""}]}
{"sql": "SELECT id,title,knn_dist() AS distance FROM docs WHERE KNN(vec,10,'the secure endpoint presents an identity for a different domain') LIMIT 3", "response": [{"columns": [{"id": {"type": "long long"}}, {"title": {"type": "string"}}, {"distance": {"type": "float"}}], "data": [{"id": 4, "title": "E2042: Certificate expired", "distance": 0.62681848}, {"id": 3, "title": "E2041: Certificate hostname mismatch", "distance": 0.66354626}, {"id": 8, "title": "E4011: Permission denied", "distance": 0.74621189}], "total": 3, "error": "", "warning": ""}]}
{"sql": "SELECT id,title,hybrid_score() AS score FROM docs WHERE MATCH('secure | identity | wrong') AND KNN(vec,10,'the secure endpoint presents an identity for a different domain') LIMIT 3 OPTION fusion_method='rrf',window_size=10", "response": [{"columns": [{"id": {"type": "long long"}}, {"title": {"type": "string"}}, {"score": {"type": "float"}}], "data": [{"id": 4, "title": "E2042: Certificate expired", "score": 0.01639344}, {"id": 3, "title": "E2041: Certificate hostname mismatch", "score": 0.01612903}, {"id": 8, "title": "E4011: Permission denied", "score": 0.01587302}], "total": 3, "error": "", "warning": ""}]}
IDS: {"lexical": [], "vector": [4, 3, 8], "hybrid": [4, 3, 8]}

CASE: conflicting code and symptom
{"sql": "SELECT id,title,weight() AS score FROM docs WHERE MATCH('E1042') ORDER BY score DESC,id ASC LIMIT 3", "response": [{"columns": [{"id": {"type": "long long"}}, {"title": {"type": "string"}}, {"score": {"type": "long long"}}], "data": [{"id": 1, "title": "E1042: Connection pool exhausted", "score": 1718}], "total": 1, "error": "", "warning": ""}]}
{"sql": "SELECT id,title,knn_dist() AS distance FROM docs WHERE KNN(vec,10,'renew an expired TLS certificate') LIMIT 3", "response": [{"columns": [{"id": {"type": "long long"}}, {"title": {"type": "string"}}, {"distance": {"type": "float"}}], "data": [{"id": 4, "title": "E2042: Certificate expired", "distance": 0.4059782}, {"id": 3, "title": "E2041: Certificate hostname mismatch", "distance": 0.59013671}, {"id": 7, "title": "E4010: Access token expired", "distance": 0.67206192}], "total": 3, "error": "", "warning": ""}]}
{"sql": "SELECT id,title,hybrid_score() AS score FROM docs WHERE MATCH('E1042') AND KNN(vec,10,'renew an expired TLS certificate') LIMIT 3 OPTION fusion_method='rrf',window_size=10", "response": [{"columns": [{"id": {"type": "long long"}}, {"title": {"type": "string"}}, {"score": {"type": "float"}}], "data": [{"id": 1, "title": "E1042: Connection pool exhausted", "score": 0.03177806}, {"id": 4, "title": "E2042: Certificate expired", "score": 0.01639344}, {"id": 3, "title": "E2041: Certificate hostname mismatch", "score": 0.01612903}], "total": 3, "error": "", "warning": ""}]}
IDS: {"lexical": [1], "vector": [4, 3, 7], "hybrid": [1, 4, 3]}

CASE: unknown code
{"sql": "SELECT id,title,weight() AS score FROM docs WHERE MATCH('E9999') ORDER BY score DESC,id ASC LIMIT 3", "response": [{"columns": [{"id": {"type": "long long"}}, {"title": {"type": "string"}}, {"score": {"type": "long long"}}], "data": [], "total": 0, "error": "", "warning": ""}]}
{"sql": "SELECT id,title,knn_dist() AS distance FROM docs WHERE KNN(vec,10,'E9999') LIMIT 3", "response": [{"columns": [{"id": {"type": "long long"}}, {"title": {"type": "string"}}, {"distance": {"type": "float"}}], "data": [{"id": 1, "title": "E1042: Connection pool exhausted", "distance": 0.777841}, {"id": 2, "title": "E1043: Database connection refused", "distance": 0.80471194}, {"id": 7, "title": "E4010: Access token expired", "distance": 0.82042432}], "total": 3, "error": "", "warning": ""}]}
{"sql": "SELECT id,title,hybrid_score() AS score FROM docs WHERE MATCH('E9999') AND KNN(vec,10,'E9999') LIMIT 3 OPTION fusion_method='rrf',window_size=10", "response": [{"columns": [{"id": {"type": "long long"}}, {"title": {"type": "string"}}, {"score": {"type": "float"}}], "data": [{"id": 1, "title": "E1042: Connection pool exhausted", "score": 0.01639344}, {"id": 2, "title": "E1043: Database connection refused", "score": 0.01612903}, {"id": 7, "title": "E4010: Access token expired", "score": 0.01587302}], "total": 3, "error": "", "warning": ""}]}
IDS: {"lexical": [], "vector": [1, 2, 7], "hybrid": [1, 2, 7]}

CASE: outside the corpus
{"sql": "SELECT id,title,weight() AS score FROM docs WHERE MATCH('sourdough | starter') ORDER BY score DESC,id ASC LIMIT 3", "response": [{"columns": [{"id": {"type": "long long"}}, {"title": {"type": "string"}}, {"score": {"type": "long long"}}], "data": [], "total": 0, "error": "", "warning": ""}]}
{"sql": "SELECT id,title,knn_dist() AS distance FROM docs WHERE KNN(vec,10,'how to feed a sourdough starter') LIMIT 3", "response": [{"columns": [{"id": {"type": "long long"}}, {"title": {"type": "string"}}, {"distance": {"type": "float"}}], "data": [{"id": 2, "title": "E1043: Database connection refused", "distance": 0.9390412}, {"id": 5, "title": "E3010: Disk quota exceeded", "distance": 0.953697}, {"id": 9, "title": "E5010: Replica lag above threshold", "distance": 1.04105222}], "total": 3, "error": "", "warning": ""}]}
{"sql": "SELECT id,title,hybrid_score() AS score FROM docs WHERE MATCH('sourdough | starter') AND KNN(vec,10,'how to feed a sourdough starter') LIMIT 3 OPTION fusion_method='rrf',window_size=10", "response": [{"columns": [{"id": {"type": "long long"}}, {"title": {"type": "string"}}, {"score": {"type": "float"}}], "data": [{"id": 2, "title": "E1043: Database connection refused", "score": 0.01639344}, {"id": 5, "title": "E3010: Disk quota exceeded", "score": 0.01612903}, {"id": 9, "title": "E5010: Replica lag above threshold", "score": 0.01587302}], "total": 3, "error": "", "warning": ""}]}
IDS: {"lexical": [], "vector": [2, 5, 9], "hybrid": [2, 5, 9]}
{"sql": "SELECT id,title FROM docs WHERE code='E1042'", "response": [{"columns": [{"id": {"type": "long long"}}, {"title": {"type": "string"}}], "data": [{"id": 1, "title": "E1042: Connection pool exhausted"}], "total": 1, "error": "", "warning": ""}]}
{"sql": "SELECT id FROM docs WHERE code='E9999'", "response": [{"columns": [{"id": {"type": "long long"}}], "data": [], "total": 0, "error": "", "warning": ""}]}
{"sql": "SELECT id FROM docs WHERE MATCH('borrow | session | busy')", "response": [{"columns": [{"id": {"type": "long long"}}], "data": [{"id": 2}], "total": 1, "error": "", "warning": ""}]}
Structural assertions passed; rankings are observations, not guaranteed wins.
