Skip to content

Commit

Permalink
configure dev env part
Browse files Browse the repository at this point in the history
  • Loading branch information
Laure-di committed Sep 24, 2024
1 parent 2ff288b commit 255e7ec
Showing 1 changed file with 44 additions and 1 deletion.
45 changes: 44 additions & 1 deletion tutorials/how-to-implement-rag/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
meta:
title: How to implement RAG with managed inference
description:
content:
h1: How to implement RAG with managed inference
tags: inference managed postgresql pgvector object storage
categories:
- inference
---

RAG (Retrieval-Augmented Generation) is a powerful approach for enhancing a model's knowledge by leveraging your own dataset.
Expand All @@ -14,4 +19,42 @@ By utilizing our managed inference services, managed databases, and object stora
- [Inference Deployment](/ai-data/managed-inference/how-to/create-deployment/): Set up an inference deployment using [sentence-transformers/sentence-t5-xxl](/ai-data/managed-inference/reference-content/sentence-t5-xxl/) on an L4 instance to efficiently process embeddings.
- [Inference Deployment](/ai-data/managed-inference/how-to/create-deployment/) with the model of your choice.
- [Object Storage Bucket](/storage/object/how-to/create-a-bucket/) to store all the data you want to inject into your LLM model.
- [Managed Database](/managed-databases/postgresql-and-mysql/how-to/create-a-database/) to securely store all your embeddings.
- [Managed Database](/managed-databases/postgresql-and-mysql/how-to/create-a-database/) to securely store all your embeddings.

## Configure your developement environnement
1. Install necessary packages: run the following command to install the required packages:
```sh
pip install langchain psycopg2 python-dotenv scaleway
```
2. Configure your environnement variables: create a .env file and add the following variables. These will store your API keys, database connection details, and other configuration values.
```sh
# .env file

# Scaleway API credentials
SCW_ACCESS_KEY=your_scaleway_access_key
SCW_SECRET_KEY=your_scaleway_secret_key
SCW_API_KEY=your_scaleway_api_key

# Scaleway project and region
SCW_DEFAULT_PROJECT_ID=your_scaleway_project_id
SCW_DEFAULT_REGION=your_scaleway_region

# Scaleway managed database (PostgreSQL) credentials
SCW_DB_NAME=your_scaleway_managed_db_name
SCW_DB_USER=your_scaleway_managed_db_username
SCW_DB_PASSWORD=your_scaleway_managed_db_password
SCW_DB_HOST=your_scaleway_managed_db_host # The IP address of your database instance
SCW_DB_PORT=your_scaleway_managed_db_port # The port number for your database instance

# Scaleway S3 bucket configuration
SCW_BUCKET_NAME=your_scaleway_bucket_name
SCW_BUCKET_ENDPOINT=your_scaleway_bucket_endpoint # S3 endpoint, e.g., https://s3.fr-par.scw.cloud

# Scaleway Inference API configuration (Embeddings)
SCW_INFERENCE_EMBEDDINGS_ENDPOINT=your_scaleway_inference_embeddings_endpoint # Endpoint for sentence-transformers/sentence-t5-xxl deployment
SCW_INFERENCE_API_KEY_EMBEDDINGS=your_scaleway_api_key_for_embeddings

# Scaleway Inference API configuration (LLM deployment)
SCW_INFERENCE_DEPLOYMENT_ENDPOINT=your_scaleway_inference_endpoint # Endpoint for your LLM deployment
SCW_INFERENCE_API_KEY=your_scaleway_api_key_for_inference_deployment
```

0 comments on commit 255e7ec

Please sign in to comment.