Skip to main content

Ask questions about your audio data

In this guide, you'll learn how to use LeMUR to ask questions and get answers about your audio data.

tip

If you want a Quickstart, see Apply LLMs to audio files.

Before you start

To use LeMUR, you need an with a credit card set up.

Basic Q&A example

If you want to send a custom prompt to the LLM, you can use the LeMUR Task and apply the model to your transcribed audio files.

To ask question about your audio data, define a prompt with your questions and call transcript.lemur.task(). The underlying transcript is automatically used as additional context for the model.

Example output

Based on the transcript, runner's knee is a condition characterized
by pain behind or around the kneecap. It is caused by overuse,
muscle imbalance and inadequate stretching. Symptoms include pain
under or around the kneecap and pain when walking.

Q&A with specialized endpoint

The LeMUR Question & Answer function requires no prompt engineering and facilitates more deterministic and structured outputs. You can use it with transcript.lemur.question().

To use it, define a list of aai.LemurQuestion objects. For each question, you can define additional context and specify either a answer_format or a list of answer_options. Additionally, you can define an overall context.

Custom Q&A example (Advanced)

This example shows how you can run a custom LeMUR task with an advanced prompt to create custom Q&A responses:

Cookbook: Custom Q&A with LeMUR Task

More Q&A prompt examples

Try any of these prompts to get started:

Question and answer"Identify any patterns or trends based on the transcript"
Closed-ended questions"Did the customer express a positive sentiment in the phone call?"
Sentiment analysis"What was the emotional sentiment of the phone call?"

For more use cases and prompt examples, see LeMUR examples.

Improve the results

To improve the results, see the following resources: