Update notebook

This commit is contained in:
davidmezzetti
2025-12-12 14:46:15 -05:00
parent 9d4772bb65
commit 6021194ac9
@@ -158,7 +158,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"id": "c7ff2a35",
"metadata": {},
"outputs": [
@@ -173,7 +173,7 @@
"source": [
"import sqlite3\n",
"\n",
"from txtai import LLM, RAG\n",
"from txtai import LLM\n",
"\n",
"def keyword(query):\n",
" return llm(f\"\"\"\n",
@@ -203,16 +203,6 @@
"# Load the LLM\n",
"llm = LLM(\"Qwen/Qwen3-4B-Instruct-2507\")\n",
"\n",
"template = \"\"\"\n",
" Answer the following question using the provided context.\n",
"\n",
" Question:\n",
" {question}\n",
"\n",
" Context:\n",
" {context}\n",
"\"\"\"\n",
"\n",
"# RAG with a SQL query\n",
"rag = RAG(sqlsearch, llm, template=template, output=\"flatten\")\n",
"print(rag(\"Tell me what happened in the 2025 World Series\", maxlength=2048))"