# 04. Add web search module

## Add web search module <a href="#id-1" id="id-1"></a>

**step**

1. Perform Naive RAG
2. Check relevance for searched documents (Groundedness Check)
3. (This tutorial) Add Web Search

**Reference**

* It's an extension from the previous tutorial, so there may be overlapping parts. Please refer to the previous tutorial for insufficient explanation.

![](https://wikidocs.net/images/page/267811/langgraph-web-search.png)

### Preferences <a href="#id-2" id="id-2"></a>

```python
# !pip install -U langchain-teddynote
```

```python
# Configuration file for managing API keys as environment variables
from dotenv import load_dotenv

# Load API key information
load_dotenv()
```

```
 True 
```

```python
# Set up LangSmith tracking. https://smith.langchain.com
# !pip install -qU langchain-teddynote
from langchain_teddynote import logging

# Enter a project name.
logging.langsmith("CH17-LangGraph-Structures")
```

```
 Start tracking LangSmith. 
[Project name] 
CH17-LangGraph-Structures 
```

### Basic PDF-based Retrieval Chain creation <a href="#pdf-retrieval-chain" id="pdf-retrieval-chain"></a>

Here, we create a Retrieval Chain based on PDF documents. Retrieval Chain with the simplest structure.

However, LangGraph creates Retirever and Chain separately. Only then can you do detailed processing for each node.

**Reference**

* As covered in the previous tutorial, we omit the detailed description.

```
```
