Skip to content
Merged
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
8 changes: 4 additions & 4 deletions tutorials/how-to-implement-rag/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Run the following command to install the required packages:
```sh
pip install langchain psycopg2 python-dotenv
```
### Step 2: Create a .env file
### Create a .env file

Create a .env file and add the following variables. These will store your API keys, database connection details, and other configuration values.

Expand Down Expand Up @@ -117,9 +117,9 @@ conn = psycopg2.connect(
cur = conn.cursor()
```

## Embeddings and Vector Store Setup
## Embeddings and vector store setup

### Import Required Modules
### Import required modules

```python
# rag.py
Expand All @@ -130,7 +130,7 @@ from langchain_postgres import PGVector

### Configure OpenAI Embeddings

We will utilize the [OpenAIEmbeddings](https://api.python.langchain.com/en/latest/embeddings/langchain_openai.embeddings.base.OpenAIEmbeddings.html) class from LangChain and store the embeddings in PostgreSQL using the PGVector integration.
We will use the [OpenAIEmbeddings](https://api.python.langchain.com/en/latest/embeddings/langchain_openai.embeddings.base.OpenAIEmbeddings.html) class from LangChain and store the embeddings in PostgreSQL using the PGVector integration.

```python
# rag.py
Expand Down