Lettuce quickstart

Quickstart

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

Prerequisites

  • Python 3.12
  • Poetry
  • Access to an OMOP-CDM database

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"

Copy this template and insert your credentials.

Run the CLI

Install dependencies

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

poetry install

Once this is complete, you can run lettuce-cli

poetry run 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!