Spaces:
Build error
Build error
Update README.md
Browse files
README.md
CHANGED
|
@@ -10,4 +10,37 @@ pinned: false
|
|
| 10 |
license: apache-2.0
|
| 11 |
---
|
| 12 |
|
| 13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
license: apache-2.0
|
| 11 |
---
|
| 12 |
|
| 13 |
+
|
| 14 |
+
This simple restaurant planner is designed to communicate with MongoDB Atlas Vector Search with the loaded Restaurant data set.
|
| 15 |
+
|
| 16 |
+
It uses OpenAI small text embeddings (256 dimesnsions) to query the database for semantic similarity search.
|
| 17 |
+
|
| 18 |
+
## How to setup your own
|
| 19 |
+
|
| 20 |
+
1. [Create an Atlas cluter](https://www.mongodb.com/docs/atlas/tutorial/deploy-free-tier-cluster/) (free clusters are available)
|
| 21 |
+
2. Load the [dataset](https://huggingface.co/datasets/AIatMongoDB/whatscooking.restaurants) using the `ingest/ingest.py` with your connection string.
|
| 22 |
+
3. Deploy the relevant [Vector Index](https://www.mongodb.com/docs/atlas/atlas-vector-search/vector-search-tutorial/#create-the-atlas-vector-search-index) on `whatscooking.smart_trips` aggregated collection "name" : `vector_index`.
|
| 23 |
+
```
|
| 24 |
+
{
|
| 25 |
+
"fields": [
|
| 26 |
+
{
|
| 27 |
+
"numDimensions": 256,
|
| 28 |
+
"path": "embedding",
|
| 29 |
+
"similarity": "cosine",
|
| 30 |
+
"type": "vector"
|
| 31 |
+
},
|
| 32 |
+
{
|
| 33 |
+
"path": "searchTrip",
|
| 34 |
+
"type": "filter"
|
| 35 |
+
}
|
| 36 |
+
]
|
| 37 |
+
}
|
| 38 |
+
```
|
| 39 |
+
- [Whitelist](https://www.mongodb.com/docs/atlas/security/ip-access-list/#std-label-access-list) access from everywhere (`0.0.0.0/0`)
|
| 40 |
+
- Locate your [cluster connection](https://www.mongodb.com/docs/atlas/tutorial/connect-to-your-cluster/) URI
|
| 41 |
+
5. Obtain your Open AI api key
|
| 42 |
+
6. "Duplicate" this space and input
|
| 43 |
+
- `MONGODB_ATLAS_CLUSTER_URI` - Your Atlas Cluster connection string
|
| 44 |
+
- `OPENAI_API_KEY`- Open AI API key
|
| 45 |
+
|
| 46 |
+
Build and use the planner!
|