Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
566 changes: 566 additions & 0 deletions haystack/fts/RAG_with_Couchbase_Capella_and_OpenAI.ipynb

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions haystack/fts/frontmatter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
# frontmatter
path: "/tutorial-openai-haystack-rag"
title: "Retrieval-Augmented Generation (RAG) with OpenAI and Haystack"
short_title: "RAG with Openai and Haystack"
description:
- Learn how to build a semantic search engine using Couchbase's Search vector index.
- This tutorial demonstrates how to integrate Couchbase's vector search capabilities with the embeddings generated by OpenAI Services.
- You will understand how to perform Retrieval-Augmented Generation (RAG) using Haystack, Couchbase and OpenAI services.
content_type: tutorial
filter: sdk
technology:
- vector search
tags:
- OpenAI
- Artificial Intelligence
- Haystack
- FTS
sdk_language:
- python
length: 60 Mins
---
71 changes: 71 additions & 0 deletions haystack/fts/fts_index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"name": "vector_search",
"type": "fulltext-index",
"sourceType": "gocbcore",
"sourceName": "test_bucket",
"planParams": {
"indexPartitions": 1,
"numReplicas": 0
},
"params": {
"doc_config": {
"docid_prefix_delim": "",
"docid_regexp": "",
"mode": "scope.collection.type_field",
"type_field": "type"
},
"mapping": {
"default_analyzer": "standard",
"default_datetime_parser": "dateTimeOptional",
"index_dynamic": true,
"store_dynamic": true,
"default_mapping": {
"dynamic": true,
"enabled": false
},
"types": {
"test_scope.test_collection": {
"dynamic": true,
"enabled": true,
"properties": {
"text": {
"dynamic": false,
"enabled": true,
"fields": [
{
"analyzer": "en",
"index": true,
"name": "text",
"store": true,
"type": "text"
}
]
},
"embedding": {
"enabled": true,
"dynamic": false,
"fields":[
{
"vector_index_optimized_for": "recall",
"docvalues": true,
"dims": 3072,
"include_in_all": false,
"include_term_vectors": false,
"index": true,
"name": "embedding",
"similarity": "dot_product",
"store": true,
"type": "vector"
}
]
},
"meta": {
"dynamic": true,
"enabled": true
}
}
}
}
}
}
}
6 changes: 6 additions & 0 deletions haystack/fts/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pandas>=2.1.4
datasets>=2.14.5
setuptools>=75.8.0
couchbase-haystack==2.*
transformers[torch]>=4.49.0
tensorflow>=2.18.0
Comment on lines +1 to +6
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The dependencies in this requirements.txt file are inconsistent with the packages used in the corresponding notebook. The notebook uses haystack-ai and openai, which are missing here. Also, transformers and tensorflow are included here but not used in the notebook. Please update the requirements to match the notebook's dependencies.

pandas>=2.1.4
datasets>=2.14.5
setuptools>=75.8.0
couchbase-haystack==2.*
haystack-ai
openai

Loading
Loading