1. Learn
  2. /
  3. Courses
  4. /
  5. Databricks with the Python SDK

Connected

Exercise

Text summarization

Want to turn a poem into a quick summary? Let’s make it happen! You have the full text of a poem stored as a string variable called raven_text, which you will hand off to a Chat AI model and ask it to summarize the poem in a set number of words.

Instructions

100 XP
  • Ask the AI agent to summarize the poem "The Raven" by Edgar Allan Poe.
  • Define the model name as Meta Llama 3, already saved as ai_model.
  • Create the message you want to send to the AI model, including the raven_text variable.
  • Use the chat message role used to query the AI model.