LLM Usage

Episode #524 by Teacher's Avatar David Kimura

Summary

In this episode, we track our prompt and completion tokens that are called from our application. This is a small feature, but can raise important insights to the usage of LLMs in our application as well as some user behavior.
rails model ai machine learning 15:53

Chapters

  • Introduction (0:00)
  • Setting up the gem (2:32)
  • Creating the AI Chat (3:19)
  • Creating the usage model (6:06)
  • Recording the LLM usage (8:49)
  • Fixing the attribute name (11:04)
  • Adding additional attributes (13:04)
  • Final thoughts (14:38)
Student & Teacher
$ 9 /mo

Valid School Email Required

Same Access as Pro

Subscribe Now
Pro Monthly
$ 19 /mo

Access to Pro Episodes

Invite to Slack Channel

Priority Suggestions

Ad Free

Subscribe Now
Pro Annual
$ 190 /yr

Access to Pro Episodes

Invite to Slack Channel

Priority Suggestions

Ad Free

Subscribe Now
Teams
$ 57 /mo

3 Users Minimum

$19.00 / user / month

Same Access as Pro

Subscribe to Teams