Lettuce quickstart

Quickstart

The fastest way to get started with Lettuce is to use the command-line interface (CLI).

Prerequisites

Clone the Lettuce repo

Configure database connection

The Lettuce CLI connects to an OMOP-CDM database as configured through environment variables. The database connection loads your credentials from a .env file.

Create a .env file
Insert database credentials

You will need the following information for your OMOP-CDM database:

DB_HOST="Your Host"
DB_USER="Your User"
DB_PASSWORD="Your Password"
DB_NAME="Your Database Name"
DB_PORT="Your Port, default is 5432"
DB_SCHEMA="Your Schema"
DB_VECTABLE="The name of your table containing vectors"
DB_VECSIZE="The length of vectors in your vector table"

Copy this template and insert your credentials.

Run the CLI

Install dependencies

Dependencies are handled with uv, and first have to be installed

uv sync

Once this is complete, you can run lettuce-cli

uv run --env-file .env lettuce-cli --informal_names "acetaminophen" --no-use_llm --no-vector_search

The flags in this command disable the vector search and LLM, just querying the database for “acetaminophen”. Running the LLM will download a model, and vector search will first build a vector database, so these flags can be omitted when you’re ready to take these steps

🥬

Congratulations on your first Lettuce query!