Skip to content

Commit

Permalink
Update notebooks, docs
Browse files Browse the repository at this point in the history
Co-authored-by: Saavrm26 <[email protected]>
  • Loading branch information
fazlulkarimweb committed Dec 10, 2023
1 parent babe815 commit 50bbd6b
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 11 deletions.
14 changes: 9 additions & 5 deletions docs/hr/content/docs/data_integrations/sql.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,22 +83,26 @@ db.execute(
... the first query above is equivalent to:

```python
db.execute(
'SELECT img FROM my-table WHERE rating > 3 LIMIT 5;'
)
from superduperdb.backends.ibis.query import RawSQL

db.execute(RawSQL('SELECT img FROM my-table WHERE rating > 3 LIMIT 5;'))
```

... the second will be equivalent to:

```python
db.execute(
from superduperdb.backends.ibis.query import RawSQL

raw_sql = RawSQL(
'''
SELECT img FROM my-table
LIKE text = 'something like this'
WHERE rating > 3
LIMIT 5;
'''
)
)

db.execute(raw_sql)
```

## Updating data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Imagine chatting with your database using just a few lines of code. Sounds unbel

Here is the behemoth 10M dataset: [FREE COMPANY DATASET](https://app.snowflake.com/marketplace/listing/GZSTZRRVYL2/people-data-labs-free-company-dataset)

Here is the [Google Colab Notebook](https://colab.research.google.com/drive/1YXzAuuQdqkWEQKchglxUuAMzNTKLu5rC#scrollTo=0Zf4Unc_fNBp) for you to quickstart!

Chatting with this type of massive dataset using the standard RAG pipeline is next to impossible due to the cost and scale. However, with SuperDuperDB, you can achieve the same functionality with just a few lines of code.

You can control the low level code while enjoying writing the high level code! So that, you can increase the capacity of it! Whether you're using `Snowflake` or `any other SQL dataset`, we've got your back.
Expand All @@ -25,7 +27,7 @@ Let's bring AI into your database! 🚀

```python
# Only one dependency
# %pip install superduperdb
# !pip install superduperdb openai

# Import SuperDuperDB and connect your database
from superduperdb import superduper
Expand Down
3 changes: 1 addition & 2 deletions docs/hr/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,7 @@ const config = {
],
announcementBar: {
id: 'support_us',
content:
'🔮 We are officially launching SuperDuperDB with the release of v0.1 on December 5th on Github! 🔮',
content: '🔮 We officially released v0.1 on Github! 🔮',
backgroundColor: '#7628f8',
textColor: '#fff',
isCloseable: true,
Expand Down
26 changes: 23 additions & 3 deletions examples/chat_with_your_database.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"\n",
"Here is the behemoth 10M dataset: [FREE COMPANY DATASET](https://app.snowflake.com/marketplace/listing/GZSTZRRVYL2/people-data-labs-free-company-dataset)\n",
"\n",
"Here is the [Google Colab Notebook](https://colab.research.google.com/drive/1YXzAuuQdqkWEQKchglxUuAMzNTKLu5rC#scrollTo=0Zf4Unc_fNBp) for you to quickstart!\n",
"\n",
"Chatting with this type of massive dataset using the standard RAG pipeline is next to impossible due to the cost and scale. However, with SuperDuperDB, you can achieve the same functionality with just a few lines of code.\n",
"\n",
"You can control the low level code while enjoying writing the high level code! So that, you can increase the capacity of it! Whether you're using `Snowflake` or `any other SQL dataset`, we've got your back.\n",
Expand All @@ -36,7 +38,16 @@
"metadata": {},
"outputs": [],
"source": [
"# %pip install superduperdb"
"# !pip install git+https://github.com/SuperDuperDB/superduperdb.git@66b457eb99f5ad9b88d10bb46f8c2d62ddbc1a1d "
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# !pip install openai"
]
},
{
Expand Down Expand Up @@ -346,13 +357,22 @@
"# If you see no result, Run this codeblock multiple times to make the gpt-3.5-turbo work better and change your query as well. Idea: start with a simple query. Then make it gradually complex.\n",
"\n",
"table_name = \"FREECOMPANYDATASET\"\n",
"query = \"Find me some company in germany in berlin in dortmund in automotive industry. Keep all in lower case\"\n",
"query = \"Find me some company in germany in berlin. Keep all in lower case.\"\n",
"\n",
"result = chat_with_your_database(table_name, query)\n",
"\n",
"result"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Let's explain the table\n",
"\n",
"Table doen't make sense to you, let LLM explain the table above"
]
},
{
"cell_type": "code",
"execution_count": 42,
Expand Down Expand Up @@ -396,7 +416,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Let's generate result on the fly by model chaining\n",
"### Let's generate result on the fly by prompt chaining\n",
"\n",
"Now you can do model-chaining as well, if you only care about the explanations. Here we found from the dataset about the company "
]
Expand Down

0 comments on commit 50bbd6b

Please sign in to comment.