Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Developing Kaggle Notebooks

You're reading from  Developing Kaggle Notebooks

Product type Book
Published in Dec 2023
Publisher Packt
ISBN-13 9781805128519
Pages 370 pages
Edition 1st Edition
Languages
Author (1):
Gabriel Preda Gabriel Preda
Profile icon Gabriel Preda

Table of Contents (14) Chapters

Preface 1. Introducing Kaggle and Its Basic Functions 2. Getting Ready for Your Kaggle Environment 3. Starting Our Travel – Surviving the Titanic Disaster 4. Take a Break and Have a Beer or Coffee in London 5. Get Back to Work and Optimize Microloans for Developing Countries 6. Can You Predict Bee Subspecies? 7. Text Analysis Is All You Need 8. Analyzing Acoustic Signals to Predict the Next Simulated Earthquake 9. Can You Find Out Which Movie Is a Deepfake? 10. Unleash the Power of Generative AI with Kaggle Models 11. Closing Our Journey: How to Stay Relevant and on Top 12. Other Books You May Enjoy
13. Index

Prompting a foundation model

LLMs can be used directly, for example, for such tasks as summarization, question answering, and reasoning. Due to the very large amounts of data on which they were trained, they can answer very well to a variety of questions on many subjects, since they have the context available in that training dataset.

In many practical cases, such LLMs can correctly answer our questions on the first attempt. In other cases, we will need to provide a few clarifications or examples. The quality of the answers in these zero-shot or few-shot approaches highly depends on the ability of the user to craft the prompts for LLM. In this section, we will show the simplest way to interact with one LLM on Kaggle, using prompts.

Model evaluation and testing

Before starting to use an LLM on Kaggle, we will need to perform a few preparation steps. We begin by loading the model and then defining a tokenizer. Next, we create a model pipeline. In our first code example,...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime}