Skip to content
Merged
Show file tree
Hide file tree
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
51 changes: 37 additions & 14 deletions content/operate/rc/langcache/create-service.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,39 @@ LangCache does not support the following databases during public preview:

From the [Redis Cloud console](https://cloud.redis.io/), select **LangCache** from the left-hand menu.

When you access the LangCache page for the first time, you will see a page with an introduction to LangCache. Select **Let's create a service** to create your first service.
If you have not already created a LangCache service, you'll see a page with an introduction to LangCache. Otherwise, select **New service** to go to the LangCache introduction page.

{{<image filename="images/rc/langcache-create-first-service.png" alt="The Let's create a service button." width="200px" >}}
{{<image filename="images/rc/langcache-new-service.png" alt="The New service button." width="150px" >}}

If you have already created a LangCache service, select **New service** to create another one.
From here:

{{<image filename="images/rc/langcache-new-service.png" alt="The New service button." width="150px" >}}
- Select **Quick create** to create a LangCache service with default settings using your Free 30MB database. If you haven't created a Free database yet, Redis Cloud will create one and set up the LangCache service for you.

{{<image filename="images/rc/langcache-quick-create.png" alt="The Quick create button." width="150px" >}}

After Redis Cloud creates your LangCache service, a window containing your LangCache service key will appear. Select **Copy** to copy the key to your clipboard.

{{<image filename="images/rc/langcache-service-key.png" alt="The LangCache service key window. Use the Copy button to save the service key to the clipboard." >}}

{{<warning>}}
This is the only time the value of the user key is available. Save it to a secure location before closing the dialog box.<br/><br/>

This takes you to the **Create LangCache service** page. The page is divided into the following sections:
If you lose the service key value, you will need to [generate a new service key]({{< relref "/operate/rc/langcache/view-edit-cache#replace-service-api-key" >}}) to be able to use the LangCache API.
{{</warning>}}

After your cache is created, you can [use the LangCache API]({{< relref "/operate/rc/langcache/use-langcache" >}}) from your client app.

You can also [view and edit the cache]({{< relref "/operate/rc/langcache/view-edit-cache" >}}) and [monitor the cache's performance]({{< relref "/operate/rc/langcache/monitor-cache" >}}).

- If you want to customize your LangCache service, select **Create custom service**.

1. The [General settings](#general-settings) section defines basic properties of your service.
1. The [Embedding settings](#embedding-settings) section defines the embedding model used by your service.
1. The [Attributes settings](#attributes-settings) section allows you to define attributes for your service.
{{<image filename="images/rc/langcache-custom-service.png" alt="The Create custom service button." width="150px" >}}

This takes you to the **Create LangCache service** page. The page is divided into the following sections:

1. The [General settings](#general-settings) section defines basic properties of your service.
1. The [Embedding settings](#embedding-settings) section defines the embedding model used by your service.
1. The [Attributes settings](#attributes-settings) section allows you to define attributes for your service.

### General settings

Expand All @@ -57,19 +77,22 @@ The **General settings** section defines basic properties of your service.
| **Service name** | Enter a name for your LangCache service. We recommend you use a name that describes your service's purpose. |
| **Select database** | Select the Redis Cloud database to use for this service from the list. |
| **TTL** | The time to live (TTL) for cache entries, in milliseconds. Default: `No expiration` - items in the cache will remain until manually removed. |
| **User** | The [database access user]({{< relref "/operate/rc/security/access-control/data-access-control/role-based-access-control" >}}) to use for this service. LangCache only supports the [`default` user]({{< relref "/operate/rc/security/access-control/data-access-control/default-user" >}}) during public preview. |
| **User for this service** | The [database access user]({{< relref "/operate/rc/security/access-control/data-access-control/role-based-access-control" >}}) to use for this service. LangCache only supports the [`default` user]({{< relref "/operate/rc/security/access-control/data-access-control/default-user" >}}) during public preview. |

### Embedding settings

The **Embedding settings** section defines the embedding model used by your service.

{{<image filename="images/rc/langcache-embedding-settings.png" alt="The Embedding settings section." >}}

Required settings depend on the embedding provider you select.

| Setting name |Description|
|:----------------------|:----------|
| **Embedding Provider** | The embedding provider to use for your service. Select between `Redis` and `OpenAI`. |
| **Embedding provider API key** | Enter your embedding provider's API key if not using the default Redis embedding provider. |
| **Model** | Select the embedding model to use for your service. |
| **Embedding Provider** | The embedding provider to use for your service. Select between `Redis`, `OpenAI`, and `Bring your own`. <br/>Any embedding provider you use must support the [OpenAI embeddings API](https://platform.openai.com/docs/api-reference/embeddings). |
| **Embedding provider API key** | Enter your embedding provider's API key *(`OpenAI` and `Bring your own` embedding providers only)* |
| **Embedding provider URL** | Enter your embedding provider's API URL *(`Bring your own` embedding provider only)* |
| **Model** | Select or enter the embedding model to use for your service. |
| **Similarity threshold** | Set the minimum similarity score required to consider a cached response a match. Range: `0.5` to `1.0`. Default: `0.85`<br/><br/>A higher value means more precise matches, but if it's too high, you will compromise on the number of matches and may lose relevant matches. A lower value means more matches, but may include less relevant matches. We recommend starting between `0.8` and `0.9` and then fine-tuning based on your results. |

### Attributes settings
Expand All @@ -78,7 +101,7 @@ Attributes provide powerful scoping capabilities for your LangCache operations.

The **Attributes settings** section allows you to define attributes for your service. It is collapsed by default.

{{<image filename="images/rc/langcache-attribute-settings.png" alt="The Attributes settings section, expanded." >}}
{{<image filename="images/rc/langcache-attribute-settings.png" alt="The Attributes settings section." >}}

LangCache allows you to define up to 5 custom attributes that align with your specific use case. To add a new attribute:

Expand All @@ -92,7 +115,7 @@ LangCache allows you to define up to 5 custom attributes that align with your sp

After you save your custom attribute, it will appear in the list of custom attributes. Use the **Delete** button to remove it.

{{<image filename="images/rc/icon-delete-teal.png" width="36px" alt="Select the Delete button to delete the selected attribute." >}}
{{<image filename="images/rc/icon-delete-lb.png" width="36px" alt="Select the Delete button to delete the selected attribute." >}}

You can also select **Add attribute** again to add an additional attribute.

Expand Down
8 changes: 2 additions & 6 deletions content/operate/rc/langcache/monitor-cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ You can monitor a LangCache service's performance from the **Metrics** tab of th

The **Metrics** tab provides a series of graphs showing performance data for your LangCache service.

You can switch between daily and weekly stats using the **Day** and **Week** buttons at the top of the page. Each graph also includes minimum, average, maximum, and latest values.
You can switch between hourly, daily, and weekly stats using the **Hour**, **Day**, and **Week** buttons at the top of the page. Each graph also includes minimum, average, maximum, and latest values.

## LangCache metrics reference

Expand Down Expand Up @@ -48,8 +48,4 @@ High cache latency may indicate one of the following:
- Inefficient embedding generation from the embedding provider
- Large cache requiring longer comparison times
- Network latency between the cache and embedding provider
- Resource constraints

### Cache items

The total number of entries stores in your cache. Each item includes the query string, embedding, response, and other metadata.
- Resource constraints
4 changes: 2 additions & 2 deletions content/operate/rc/langcache/view-edit-cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The **Connectivity** section provides the connection details for your LangCache
|:----------------------|:----------|
| **API Key** | The Bearer token for your LangCache API requests. |
| **Cache ID** | The unique ID of your LangCache service. |
| **API Base URL** | The base URL for LangCache API requests. |
| **URL List** | A list of base URLs for LangCache API requests. Use the closest URL for the best performance. |

Select the **Copy** button next to the Cache ID and API Base URL to copy them to the clipboard. If you lost the API key value or need to rotate the key, you can [generate a new service API key](#replace-service-api-key) at any time.

Expand All @@ -51,7 +51,7 @@ To generate a new service key:

1. Select **Generate key**.

{{<image filename="images/rc/langcache-replace-key.png" alt="The Replace Key button." >}}
{{<image filename="images/rc/langcache-replace-key.png" alt="The Generate Key button." >}}

1. A confirmation dialog will appear. Select **Confirm** to confirm.

Expand Down
Binary file modified static/images/rc/button-access-management-user-key-create.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/images/rc/langcache-add-attribute.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/images/rc/langcache-attribute-settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/images/rc/langcache-custom-attributes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/images/rc/langcache-custom-service.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/images/rc/langcache-embedding-settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/images/rc/langcache-general-settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/images/rc/langcache-metrics.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/images/rc/langcache-new-service.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/images/rc/langcache-quick-create.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/images/rc/langcache-replace-key.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/images/rc/langcache-service-key.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/images/rc/langcache-service-list.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/images/rc/langcache-view-actions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/images/rc/langcache-view-attributes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/images/rc/langcache-view-connectivity.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/images/rc/langcache-view-general.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.