Skip to main content

Connect an LLM

LLM assistance is optional. Supported deterministic queries and analyses work without it. On Desktop, the local owner configures models; on Web, an administrator does this.

Add a connection​

  1. Start your model service, such as LM Studio, and load a model.
  2. Open Admin > Models in COHORTome.
  3. Add its OpenAI-compatible API URL, model name and API key if required.
  4. Choose its data boundary, enable it, and save.
  5. Use Test connection. Users can then select the provider in Settings.

The API URL must be reachable from the machine running COHORTome. Inside Docker, localhost means the container, not the host computer.

On Desktop, System default (LM Studio) is editable. Web providers supplied by deployment configuration are read-only in the UI; see deployment-managed models.

Choose the data boundary carefully​

  • Local: the service is inside your approved private-data environment.
  • External: the service is outside that environment.

“Local” is a trust decision, not merely a private IP address or the use of LM Studio. COHORTome does not infer it from the URL.

Allow dataset context​

In Admin > Data, choose what each dataset may send to models: Detailed allowed, Safe summary, or Blocked.

Private datasets never send context to an external provider. With several datasets selected, the strictest policy applies. Choosing a provider does not override these rules. Safe summary permits structural, non-clinical context; it does not permit aggregate clinical content.

A General question sends no workspace context. See Governed AI for the full behavior.

API keys and troubleshooting

Keys are write-only in the interface. Leave the replacement field blank to keep the saved key. Stored keys are protected by filesystem permissions, not encrypted by COHORTome; protect the runtime and its backups.

If the connection test fails, check the URL, loaded model, credentials and network access from the COHORTome host. An unavailable provider does not mean the underlying dataset or deterministic analyses are unavailable.