Skip to content

Welcome to Lehmus AI: Quick Start Guide


Keywords: , , , ,

Welcome to the Lehmus AI platform. This guide will help you get your project up and running. If you run into any hurdles, our support team is available both on-campus and online to assist you. To follow this guide, you must have access rights to Lehmus AI platform. You can find the instructions for getting the access rights from Lehmus AI: Secure Generative AI Platform.

The Basics: What is Lehmus AI?

Lehmus AI is a backend platform providing access to local Large Language Models (LLMs), AI Agents, and RAG (Retrieval-Augmented Generation) systems. In practice, this means that you can chat with AI securely, use different language models, and allow AI to read files you want. Lehmus AI also includes chat user interface.

Managing Your Team (Access Control)

Access is managed via University of Oulu IDM groups. Each project is assigned two specific groups:

  1. Members: lehmusai-projectid-staff|idm

  2. Administrators: lehmusai-projectid-admins-staff

How to add members:

  • Where: Visit u.oulu.fi/modgroup.

  • Requirement: You must be on the University VPN and logged in with your university account.

  • Result: Once added to a group, users can log in to the Lehmus AI Portal.

Selecting Your Project (Tenants)

The system uses Tenants to keep data secure and isolated. This ensures that the data and settings of different projects remain separate and protected.

Usually, you belong to only one project, in which case you will be taken directly to the correct workspace when you sign in. However, if you belong to multiple projects, you can switch between them:

  • To switch: Click your email address in the portal and select Switch Tenant.

  • Note: Data, RAG settings, and endpoints are unique to each tenant and cannot be shared across different projects.

Using the chat and your own documents (RAG)

Most users use the platform through the chat interface, which you can find on the service dashboard by clicking Private Chat UI > Open Chat. In the chat, you can use AI for general purposes or provide it with your own documents, for example.

Using your own files – Creating a RAG endpoint

With the RAG system, you can attach your own documents to the platform, such as PDF files. The AI will then primarily use those documents when answering your questions.

  1. Create a RAG endpoint: Click RAG endpoints in the left sidebar of the service and select Deploy RAG endpoint in the upper-right corner of the page that opens. Enter a descriptive name for your RAG endpoint in the Name field, then click the Deploy button.
  2. Add documents to the RAG endpoint: After you have created a RAG endpoint, open it from the RAG endpoints page. On the General tab that opens, click the File Management button under Data sources. From there, you can either upload files to this RAG endpoint under Upload Files or remove files if needed under Manage Files. After selecting the files, you want to upload to the RAG endpoint, remember to click the Upload button so that the selected files are uploaded to this RAG endpoint.
  3. Use the RAG endpoint: When you are in the chat interface, you can activate the RAG endpoint you created by clicking the Knowledge bases button in the lower-right corner of the text field. From there, enable your RAG endpoint in the chat by selecting it. You may have several RAG endpoints created, for example for examining different datasets or reviewing specific instructions, so make sure you activate the correct RAG endpoint in the chat. You can also use multiple RAG endpoints in the chat at the same time. Once you have activated RAG, the AI will primarily retrieve answers from the files you have uploaded to that RAG endpoint.

Setting Up Endpoints & API Keys

This section is intended for users who want to connect external applications, such as Open WebUI, to Lehmus AI models. If you only use the portal’s chat feature, you can skip this section.

To connect your applications (like Open WebUI) to our models, you need to create an API key. API keys can be personal or service accounts. Use personal account for testing and your own tools. Use service account if you are going to deploy new application that will utilize the Lehmus AI platform as LLM and RAG platform.

1. Create an API key

These instructions will help you create an API key that lets you access the language models linked to that API key.

  1. Click API keys in the left sidebar on the service home page.
  2. On the API keys page, click the Create API key button in the top-right corner.
  3. Enter a name for your API key and choose whether to create a Personal or Service Account API key. A good practice is to create a separate API key for each user or application so that usage can be tracked accurately.
  4. Under Resource type, choose the type of API key you want to create (Model deployment, External Model, RAG Deployment, Group). Under Resource > Select resource, you can choose a language model from the available options. Please note that if you want to use the same API key both for model usage and for RAG endpoints, the RAG endpoint must be created before the API key, and you must assign both Model Deployment and RAG Deployment for each language model you want to use. This means you may need to add, for example, Gemma4 31B twice to the same API key (Model Deployment + RAG Deployment).

Our current recommendation is Gemma4 31B, which offers a good balance between performance and speed. Using the Add grant button, you can add multiple language models to the same API key.

  1. When everything is ready, click Create.

Remember to copy and save your API key! You will not be able to see it again after this step.

2. Finding the unique identifiers of language models for API calls

  1. On the service home page, click Models in the left sidebar to see a list of the available models.
  2. Click the language model you want to use to open its page, where you can see details such as the model ID and API URL.

3. Creating API calls with the API key

This page contains example calls for using the language models of the Lehmus AI platform. To call the language models, you need an API key and the model’s public ID. The default API base URL is https://api.lehmus-ai.oulu.fi/v1

Chat Completions API interface

curl –request post \
–url https://api.lehmus-ai.oulu.fi/v1/chat/completions \
–header ’authorization: Bearer api_key_here’ \
–header ’content-type: application/json’ \
–data ’{
”model”: ”model_id_here”,
”messages”: [
{
”role”: ”user”,
”content”: ”What does this platform do?”
}
],
”temperature”: 0.7,
”max_tokens”: 150
}’

Responses API interface

curl –request post \
–url https://api.lehmus-ai.oulu.fi/v1/responses \
–header ’authorization: Bearer api_key_here’ \
–header ’content-type: application/json’ \
–data ’{
”model”: ”model_id_here”,
”input”: [
{
”role”: ”user”,
”content”: ”What is the capital of France?”
}
]
}’

Further Reading

Lehmus AI is built on Confidential Minds technology. For advanced configurations and technical deep dives, please refer to the Confidential Minds Documentation.

« Back

This article was published in categories English version available, All instructions, for the University of Oulu staff, for the University of Oulu students, UniOulu and tags , , , , . Add the permalink to your favourites.