# Configure your Rell module · Semantic search on Chromia using Vector DB · Learn Chromia

> This lesson walks you through setting the Vector Database Extension's dimensionality in chromia.yml and getting the file ready for a Chromia testnet deployment.

Source: https://chromia.com/learn/vector-db-movie-demo/setup/configure.rell/

Semantic search on Chromia using Vector DBLesson 4 of 15

1. [01Searching movies semantically on Chromia](https://chromia.com/learn/vector-db-movie-demo/introduction/)

Module 1: Project setup

1. [02Overview](https://chromia.com/learn/vector-db-movie-demo/setup/)
2. [03Choose an embedding model](https://chromia.com/learn/vector-db-movie-demo/setup/embedding-model/)
3. [04Configure your Rell module](https://chromia.com/learn/vector-db-movie-demo/setup/configure.rell/)
4. [05Deploy your Rell module](https://chromia.com/learn/vector-db-movie-demo/setup/deploy-rell-module/)
5. [06Finalize your Python environment](https://chromia.com/learn/vector-db-movie-demo/setup/finalize-python-env/)

Module 2: Running the data pipeline

1. [07Overview](https://chromia.com/learn/vector-db-movie-demo/data-pipeline/)
2. [08Preprocess movie data](https://chromia.com/learn/vector-db-movie-demo/data-pipeline/preprocess/)
3. [09Generate sentence embeddings](https://chromia.com/learn/vector-db-movie-demo/data-pipeline/generate-embeddings/)
4. [10Store vectors on the blockchain](https://chromia.com/learn/vector-db-movie-demo/data-pipeline/upload-vectors/)

1. [11Search the vector database](https://chromia.com/learn/vector-db-movie-demo/search/)

Module 4: A deep dive into the code

1. [12Overview](https://chromia.com/learn/vector-db-movie-demo/code-deep-dive/)
2. [13Link your data to the Vector DB with Rell](https://chromia.com/learn/vector-db-movie-demo/code-deep-dive/rell-interface/)
3. [14Work with Chromia through the Python client](https://chromia.com/learn/vector-db-movie-demo/code-deep-dive/python-client/)

1. [15Use cases and extensions](https://chromia.com/learn/vector-db-movie-demo/use-cases/)

[Learn](https://chromia.com/learn/)[Semantic search on Chromia using Vector DB](https://chromia.com/learn/vector-db-movie-demo/)

04 / 15Module 1: Project setupAdvanced

# Configure your Rell module

This lesson walks you through setting the Vector Database Extension's dimensionality in `chromia.yml` and getting the file ready for a Chromia testnet deployment.

## Open the `rell/` folder

If your terminal is still in the `python/` folder from the last step, return to the project root:

bash

```nolines
cd ..
```

Then change into the folder that holds the Rell backend:

bash

```nolines
cd rell
```

## Set the correct embedding dimensions

In `chromia.yml`, locate this section:

rell/chromia.yml

```
blockchains:
  vector_demo:  # Update this to a unique name before deployment
    module: vector_interface
    config:
      gtx:
        modules:
          - "net.postchain.gtx.extensions.vectordb.VectorDbGTXModule"
      vector_db_extension:
        dimensions: 768  # Match your selected embedding model
```

Change the `dimensions:` value so it fits the embedding model you picked earlier:

| Model | Dimensions |
| --- | --- |
| MiniLM | 384 |
| mpnet-base | 768 |
| mpnet-large / e5 / bge | 1024 |

note

The value must be identical to the vector length your model outputs.  
If the two differ, uploading or querying vectors will fail.

## Set a unique chain name

Chain name must be globally unique on testnet

Replace the value on this line of `chromia.yml` with a name of your own. Testnet uses it as your chain's public identifier:

yaml

```nolines
blockchains:
  vector_demo:  # Update this to a unique name before deployment
```

Example:

yaml

```nolines
blockchains:
  vector_demo_42:
```

Deployment fails if someone has already deployed a chain under that name, so pick one nobody else on testnet is likely to use.

## Generate a deployment key

The deployment transaction must be signed with a deployment key. If you don't have one yet, create it with:

bash

```nolines
chr keygen --key-id="vector_db_demo_key"
```

The command writes a fresh key pair to your local `.chromia` directory.

Your private key is stored here:

bash

```nolines
~/.chromia/vector_db_demo_key
```

Open the file, copy the entire hex-encoded private key, and set it as the `PRIV_KEY` value in the `.env` file inside the `python/` folder:

env

```nolines
PRIV_KEY=<your-private-key>
```

You need this key to sign the transactions that upload or query vectors on-chain.

## Lease a container on testnet

Deployment requires a leased container with Vector Database Extension support.

Use this guide to lease one and get its container ID:

[Get a container on Chromia testnet](https://docs.chromia.com/build/deployment/testnet-tokens/get-tchr-chromia/)

Using your public key

The leasing process asks for a public key. Supply the one you created with `chr keygen`.

It was printed to your terminal when the key was generated, and you can also read it from this file:

bash

```nolines
~/.chromia/<your-key-id>.pubkey
```

With the container leased, add its ID to `chromia.yml` like this:

yaml

```
deployments:
  testnet:
    brid: x"6F1B061C633A992BF195850BF5AA1B6F887AEE01BB3F51251C230930FB792A92"
    url: https://node0.testnet.chromia.com:7740
    container: <your-container-id>
    # After deployment, insert the generated `chains:` section here
```

Don't change `brid` or `url`; they already reference the testnet Directory Chain and node0.

## What’s next?

Your `chromia.yml` now has the container ID, the right embedding dimensions, and a unique chain name, and you have a deployment key. That's everything required to deploy the Rell module, which the next lesson covers.

Written for this site from Chromia’s public course. Code samples are the course’s own.

[← Previous**Choose an embedding model**](https://chromia.com/learn/vector-db-movie-demo/setup/embedding-model/)[Next →**Deploy your Rell module**](https://chromia.com/learn/vector-db-movie-demo/setup/deploy-rell-module/)

On this page

* [Open the rell/ folder](#open-the-rell-folder)
* [Set the correct embedding dimensions](#set-the-correct-embedding-dimensions)
* [Set a unique chain name](#set-a-unique-chain-name)
* [Generate a deployment key](#generate-a-deployment-key)
* [Lease a container on testnet](#lease-a-container-on-testnet)
* [What’s next?](#whats-next)
