Skip to content

Commit

Permalink
Vector demos
Browse files Browse the repository at this point in the history
  • Loading branch information
synedra committed Feb 12, 2024
1 parent 2a7fadf commit c4ab747
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 16 deletions.
38 changes: 25 additions & 13 deletions astrajson/awesome-astra-vector-demos.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
{
"key": "awesome-astra-vector-demos",
"tags": ["vector", "astradb", "python", "cassio", "langchain"],
"urls": {
"github": "https://github.com/awesome-astra/docs",
"heroimage": "https://raw.githubusercontent.com/awesome-astra/docs/main/docs/img/vector_demos/vector_demos.png",
"readme": "https://raw.githubusercontent.com/awesome-astra/docs/main/docs/pages/aiml/llm/vector_demos.md"
},
"name": "Vector Demos",
"description": "Vector Search and GenAI, a curated collection of demo notebooks and apps.",
"duration": "2h",
"skilllevel": "Intermediate",
"priority": 1
}
"key": "awesome-astra-vector-demos",
"tags": [
"vector",
"astradb",
"python",
"cassio",
"langchain"
],
"urls": {
"github": "https://github.com/awesome-astra/docs",
"heroimage": "https://raw.githubusercontent.com/awesome-astra/docs/main/docs/img/vector_demos/vector_demos.png",
"readme": "https://raw.githubusercontent.com/awesome-astra/docs/main/docs/pages/aiml/llm/vector_demos.md"
},
"last_modified": "Thu, 21 Dec 2023 13:11:38 GMT",
"forks_count": 15,
"stargazers_count": 31,
"name": "Vector Demos",
"description": "Vector Search and GenAI, a curated collection of demo notebooks and apps.",
"duration": "2h",
"skilllevel": "Intermediate",
"priority": 1,
"readme": "<div class=\"nosurface\" markdown=\"1\">\n<img src=\"../../../../img/vector_demos/vector_demos.png\" style=\"height: 180px;\" />\n</div>\n<p><strong>Vector Search and GenAI, a curated collection of demo notebooks and apps.</strong></p>\n<h2>Notebooks</h2>\n<p>This is a collection of quickstarts and tutorials, available either<br />\nas stand-alone <a href=\"/docs/pages/tools/notebooks/jupyter/\">Jupyter</a><br />\nor Google Colab notebooks (usually both),<br />\nand involving Astra DB and generative AI --<br />\nspecifically, vector-search-powered use cases.</p>\n<table>\n<thead>\n<tr>\n<th>Overview</th>\n<th>Prerequisites</th>\n<th>Links</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Learn about using Vector Search to find content related to a query, and then pass that to an LLM to understand how the RAG pattern works for AI powered chatbots.</td>\n<td>You will need an <strong>Astra account</strong> with a <strong>Serverless Cassandra with Vector Search</strong> database. Moreover, an <strong>OpenAI API Key</strong> is required.</td>\n<td><a href=\"https://colab.research.google.com/github/awesome-astra/docs/blob/main/docs/pages/tools/notebooks/Retrieval_Augmented_Generation_(for_AI_Chatbots).ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open in Colab\"/></a> Or, <a href=\"https://github.com/awesome-astra/docs/blob/main/docs/pages/tools/notebooks/Retrieval_Augmented_Generation_(for_AI_Chatbots).ipynb\">download the notebook</a>.</td>\n</tr>\n<tr>\n<td>Learn how to use Vector Similarity Search to find images based on natural language descriptions using CLIP.</td>\n<td>You will need an <strong>Astra account</strong> with a <strong>Serverless Cassandra with Vector Search</strong> database.</td>\n<td><a href=\"https://colab.research.google.com/github/awesome-astra/docs/blob/main/docs/pages/tools/notebooks/astra_vsearch_image.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open in Colab\"/></a> Or, <a href=\"https://github.com/awesome-astra/docs/blob/main/docs/pages/tools/notebooks/astra_vsearch_image.ipynb\">download the notebook</a>.</td>\n</tr>\n<tr>\n<td>Try a simple Question-Answering demo powered by a vector-capable database instance. You will use the Astra integration for LangChain and OpenAI for the embeddings and the LLM (Large-Language-Model).</td>\n<td>You will need an <strong>Astra account</strong> with a <strong>Serverless Cassandra with Vector Search</strong> database. Moreover, an <strong>OpenAI API Key</strong> is required.</td>\n<td><a href=\"https://colab.research.google.com/github/awesome-astra/docs/blob/main/docs/pages/tools/notebooks/Quickstart_QA_Search_with_LangChain.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open in Colab\"/></a> Or, <a href=\"https://github.com/awesome-astra/docs/blob/main/docs/pages/tools/notebooks/Quickstart_QA_Search_with_LangChain.ipynb\">download the notebook</a>.</td>\n</tr>\n<tr>\n<td>Understand Vector Search and the RAG pattern by building a simple generator of &quot;philosophical quotes&quot; which uses Astra for storage and OpenAI for retrieval+generation.</td>\n<td>You will need an <strong>Astra account</strong> with a <strong>Serverless Cassandra with Vector Search</strong> database. Moreover, an <strong>OpenAI API Key</strong> is required.</td>\n<td>Notebooks (including Colab links) hosted by <a href=\"https://github.com/openai/openai-cookbook/tree/main/examples/vector_databases/cassandra_astradb\">openai-cookbook</a>.</td>\n</tr>\n</tbody>\n</table>\n<p>If you open the notebooks in Colab, and would like to make changes to them, choose &quot;Save a copy in Drive&quot; from the File menu in Colab.</p>\n<h2>Sample applications</h2>\n<p>Check this section for full applications making use of Vector Search,<br />\nAstra DB and other GenAI technologies.</p>\n<ul>\n<li>AI-powered <a href=\"https://github.com/CassioML/langchain-hotels-app#readme\">&quot;Hotel search demo&quot;</a> (uses Vector Search and GenAI personalization; has a one-click &quot;open in Gitpod&quot; button)</li>\n<li>AI-powered <a href=\"https://github.com/CassioML/langchain-flare-pdf-qa-demo#readme\">&quot;FLARE QA on PDF files&quot;</a> application (vector-search-based question-answering client+API setup; has a one-click &quot;open in Gitpod&quot; button)</li>\n</ul>\n",
"readme_markdown": "<div class=\"nosurface\" markdown=\"1\">\n\n<img src=\"../../../../img/vector_demos/vector_demos.png\" style=\"height: 180px;\" />\n</div>\n\n**Vector Search and GenAI, a curated collection of demo notebooks and apps.**\n\n## Notebooks\n\nThis is a collection of quickstarts and tutorials, available either\nas stand-alone [Jupyter](/docs/pages/tools/notebooks/jupyter/)\nor Google Colab notebooks (usually both),\nand involving Astra DB and generative AI --\nspecifically, vector-search-powered use cases.\n\n| Overview | Prerequisites | Links |\n|---|---|---|\n| Learn about using Vector Search to find content related to a query, and then pass that to an LLM to understand how the RAG pattern works for AI powered chatbots. | You will need an **Astra account** with a **Serverless Cassandra with Vector Search** database. Moreover, an **OpenAI API Key** is required. | <a href=\"https://colab.research.google.com/github/awesome-astra/docs/blob/main/docs/pages/tools/notebooks/Retrieval_Augmented_Generation_(for_AI_Chatbots).ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open in Colab\"/></a> Or, <a href=\"https://github.com/awesome-astra/docs/blob/main/docs/pages/tools/notebooks/Retrieval_Augmented_Generation_(for_AI_Chatbots).ipynb\">download the notebook</a>.|\n| Learn how to use Vector Similarity Search to find images based on natural language descriptions using CLIP. | You will need an **Astra account** with a **Serverless Cassandra with Vector Search** database. | <a href=\"https://colab.research.google.com/github/awesome-astra/docs/blob/main/docs/pages/tools/notebooks/astra_vsearch_image.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open in Colab\"/></a> Or, <a href=\"https://github.com/awesome-astra/docs/blob/main/docs/pages/tools/notebooks/astra_vsearch_image.ipynb\">download the notebook</a>.|\n| Try a simple Question-Answering demo powered by a vector-capable database instance. You will use the Astra integration for LangChain and OpenAI for the embeddings and the LLM (Large-Language-Model). | You will need an **Astra account** with a **Serverless Cassandra with Vector Search** database. Moreover, an **OpenAI API Key** is required. | <a href=\"https://colab.research.google.com/github/awesome-astra/docs/blob/main/docs/pages/tools/notebooks/Quickstart_QA_Search_with_LangChain.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open in Colab\"/></a> Or, <a href=\"https://github.com/awesome-astra/docs/blob/main/docs/pages/tools/notebooks/Quickstart_QA_Search_with_LangChain.ipynb\">download the notebook</a>.|\n| Understand Vector Search and the RAG pattern by building a simple generator of \"philosophical quotes\" which uses Astra for storage and OpenAI for retrieval+generation. | You will need an **Astra account** with a **Serverless Cassandra with Vector Search** database. Moreover, an **OpenAI API Key** is required. | Notebooks (including Colab links) hosted by [openai-cookbook](https://github.com/openai/openai-cookbook/tree/main/examples/vector_databases/cassandra_astradb). |\n\n\nIf you open the notebooks in Colab, and would like to make changes to them, choose \"Save a copy in Drive\" from the File menu in Colab.\n\n\n## Sample applications\n\nCheck this section for full applications making use of Vector Search,\nAstra DB and other GenAI technologies.\n\n- AI-powered [\"Hotel search demo\"](https://github.com/CassioML/langchain-hotels-app#readme) (uses Vector Search and GenAI personalization; has a one-click \"open in Gitpod\" button)\n- AI-powered [\"FLARE QA on PDF files\"](https://github.com/CassioML/langchain-flare-pdf-qa-demo#readme) application (vector-search-based question-answering client+API setup; has a one-click \"open in Gitpod\" button)\n\n\n\n\n",
"_id": "awesome-astra-vector-demos"
}
6 changes: 3 additions & 3 deletions getAppData.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,16 +313,16 @@ def main():

try:
demo_collection.insert_one(newentry)
print("Inserted " + newentry["key"])
print(" Inserted " + newentry["key"])
except:
demo_collection.find_one_and_replace(filter={"_id":newentry["key"]}, replacement=newentry)
print("Replaced " + newentry["key"])
print(" Replaced " + newentry["key"])

filename = "./astrajson/" + newentry["key"] + ".json"
del newentry["$vector"]
with open(filename, 'w') as outfile:
json.dump(newentry, outfile, indent=4)
print("Wrote " + filename)
print(" Wrote " + filename)


def cleanTags(tags):
Expand Down

0 comments on commit c4ab747

Please sign in to comment.