Browse Source

Update StructuredLlama.ipynb

sekyonda 1 year ago
parent
commit
32788cf49a
1 changed files with 8 additions and 3 deletions
  1. 8 3
      demo_apps/StructuredLlama.ipynb

+ 8 - 3
demo_apps/StructuredLlama.ipynb

@@ -77,6 +77,7 @@
    "metadata": {},
    "source": [
     "Next we call the Llama 2 model from replicate. In this example we will use the llama 2 13b chat model. You can find more Llama 2 models by searching for them on the [Replicate model explore page](https://replicate.com/explore?query=llama).\n",
+    "\n",
     "You can add them here in the format: model_name/version"
    ]
   },
@@ -100,8 +101,10 @@
    "id": "6d421ae7",
    "metadata": {},
    "source": [
-    "Next you will need create the `nba_roster.db` file. To do this run:\n",
-    "- `python txt2csv.py` to convert the `nba.txt` file to `nba_roster.csv`. The `nba.txt` file was created by scraping the NBA roster info from the web.\n",
+    "Next you will need create the `nba_roster.db` file. \n",
+    "\n",
+    "To do this run the following commands while in this folder:\n",
+    "- `python txt2csv.py`  This will convert the `nba.txt` file to `nba_roster.csv`. The `nba.txt` file was created by scraping the NBA roster info from the web.\n",
     "- Then run `python csv2db.py` to convert `nba_roster.csv` to `nba_roster.db`.\n",
     "\n",
     "Once you have your `nba_roster.db` ready, we set up the database to be queried by Llama 2 through Langchain's [SQL chains](https://python.langchain.com/docs/use_cases/qa_structured/sql)."
@@ -352,9 +355,11 @@
    "id": "98b2c523",
    "metadata": {},
    "source": [
+    "\n",
     "Since we did not pass any context along with the follow-up to the model it did not know who \"his\" is and just picked LeBron James.\n",
+    "\n",
     "Let's try to fix the issue that the context (the previous question and answer) was not sent to the model along with the new question.\n",
-    "`SQLDatabaseChain.from_llm` has a parameter \"memory\" which can be set to a `ConversationBufferMemory` instance, which looks promising."
+    "`SQLDatabaseChain.from_llm` has a parameter \"memory\" which can be set to a `ConversationBufferMemory` instance, which looks promising.\n"
    ]
   },
   {