Skip to main content

Documentation Index

Fetch the complete documentation index at: https://langbear.runbear.io/llms.txt

Use this file to discover all available pages before exploring further.

This page guides you through the process of developing prompt ratings. Check out Application Prompt Ratings page to learn more about prompt rating dashboard.

Getting the prompt request key

To save a prompt rating, you need to know the prompt request key. This key is returned when you call the Prompts#get method:
prompt = lb.prompts.get("company-name-generation")
prompt_reqeust_key = prompt.request_key

Saving prompt ratings

To save a prompt rating, call the save method on the Ratings object:
lb.ratings.save(
  request_key=prompt_request_key,
  rating=0.5,                       # between 0.0 and 1.0
  metadata={"key": "value"},        # optional
)