Skip to content

Commit 93c3933

Browse files
authored
Haystack and Llamaindex fst and gsi examples (#62)
* haystack and llamaindex example for gsi and fts * refactor * added not for default linear vector search * haystack cookbook update * composite changes * clean up * reverted code * reverted code * file name changes * test fix * tag name * fix for bulk error * ignore llama index gsi example * tag changes * description change
1 parent d74a18e commit 93c3933

12 files changed

+3111
-0
lines changed

haystack/fts/RAG_with_Couchbase_Capella_and_OpenAI.ipynb

Lines changed: 566 additions & 0 deletions
Large diffs are not rendered by default.

haystack/fts/frontmatter.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
# frontmatter
3+
path: "/tutorial-openai-haystack-rag"
4+
title: "Retrieval-Augmented Generation (RAG) with OpenAI and Haystack"
5+
short_title: "RAG with Openai and Haystack"
6+
description:
7+
- Learn how to build a semantic search engine using Couchbase's Search vector index.
8+
- This tutorial demonstrates how to integrate Couchbase's vector search capabilities with the embeddings generated by OpenAI Services.
9+
- You will understand how to perform Retrieval-Augmented Generation (RAG) using Haystack, Couchbase and OpenAI services.
10+
content_type: tutorial
11+
filter: sdk
12+
technology:
13+
- vector search
14+
tags:
15+
- OpenAI
16+
- Artificial Intelligence
17+
- Haystack
18+
- FTS
19+
sdk_language:
20+
- python
21+
length: 60 Mins
22+
---

haystack/fts/fts_index.json

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{
2+
"name": "vector_search",
3+
"type": "fulltext-index",
4+
"sourceType": "gocbcore",
5+
"sourceName": "test_bucket",
6+
"planParams": {
7+
"indexPartitions": 1,
8+
"numReplicas": 0
9+
},
10+
"params": {
11+
"doc_config": {
12+
"docid_prefix_delim": "",
13+
"docid_regexp": "",
14+
"mode": "scope.collection.type_field",
15+
"type_field": "type"
16+
},
17+
"mapping": {
18+
"default_analyzer": "standard",
19+
"default_datetime_parser": "dateTimeOptional",
20+
"index_dynamic": true,
21+
"store_dynamic": true,
22+
"default_mapping": {
23+
"dynamic": true,
24+
"enabled": false
25+
},
26+
"types": {
27+
"test_scope.test_collection": {
28+
"dynamic": true,
29+
"enabled": true,
30+
"properties": {
31+
"text": {
32+
"dynamic": false,
33+
"enabled": true,
34+
"fields": [
35+
{
36+
"analyzer": "en",
37+
"index": true,
38+
"name": "text",
39+
"store": true,
40+
"type": "text"
41+
}
42+
]
43+
},
44+
"embedding": {
45+
"enabled": true,
46+
"dynamic": false,
47+
"fields":[
48+
{
49+
"vector_index_optimized_for": "recall",
50+
"docvalues": true,
51+
"dims": 3072,
52+
"include_in_all": false,
53+
"include_term_vectors": false,
54+
"index": true,
55+
"name": "embedding",
56+
"similarity": "dot_product",
57+
"store": true,
58+
"type": "vector"
59+
}
60+
]
61+
},
62+
"meta": {
63+
"dynamic": true,
64+
"enabled": true
65+
}
66+
}
67+
}
68+
}
69+
}
70+
}
71+
}

haystack/fts/requirements.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pandas>=2.1.4
2+
datasets>=2.14.5
3+
setuptools>=75.8.0
4+
couchbase-haystack==2.*
5+
transformers[torch]>=4.49.0
6+
tensorflow>=2.18.0

0 commit comments

Comments
 (0)