Artificial intelligence: Difference between revisions
Make the library AI evaluation exercise runnable with sample notices and exact questions |
Connect the library example to a broader section on evaluating AI answers |
||
| Line 13: | Line 13: | ||
A language model works with ''tokens'', which can be words, parts of words, or punctuation. Many generative language models produce text by repeatedly predicting the next token from the text already available. This makes it possible to write a draft or summarize a passage. A fluent answer can still contain a wrong date or a reference that does not exist. The answer has to be checked against evidence when accuracy matters.<ref>Google for Developers, "[https://developers.google.com/machine-learning/crash-course/llm Introduction to Large Language Models]", ''Machine Learning Crash Course''.</ref><ref name="nist">National Institute of Standards and Technology (2024), ''[https://doi.org/10.6028/NIST.AI.600-1 Artificial Intelligence Risk Management Framework: Generative Artificial Intelligence Profile]'', NIST AI 600-1.</ref> | A language model works with ''tokens'', which can be words, parts of words, or punctuation. Many generative language models produce text by repeatedly predicting the next token from the text already available. This makes it possible to write a draft or summarize a passage. A fluent answer can still contain a wrong date or a reference that does not exist. The answer has to be checked against evidence when accuracy matters.<ref>Google for Developers, "[https://developers.google.com/machine-learning/crash-course/llm Introduction to Large Language Models]", ''Machine Learning Crash Course''.</ref><ref name="nist">National Institute of Standards and Technology (2024), ''[https://doi.org/10.6028/NIST.AI.600-1 Artificial Intelligence Risk Management Framework: Generative Artificial Intelligence Profile]'', NIST AI 600-1.</ref> | ||
[[Retrieval-augmented generation|Retrieval-augmented generation]] gives a language model material to consult when it answers a question. The application can search a collection of documents and pass along a relevant passage, such as a current schedule or policy. A reader can then check the answer against the source the system used. Errors are possible at both steps. The search can return an outdated document, and the model can misread a current one.<ref>Patrick Lewis and colleagues (2020), "[https://proceedings.neurips.cc/paper/2020/hash/6b493230205f780e1bc26945df7481e5-Abstract.html Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks]", ''Advances in Neural Information Processing Systems'', 33.</ref> | |||
== | == Evaluating AI answers == | ||
An email filter can be tested on messages whose correct labels are already known. An AI assistant that answers from documents can be tested the same way. Pick questions you can check against the documents, and see whether the assistant gets the answer right and points to evidence that supports it. Include an ordinary case, an exception to a rule, and a question the documents leave unanswered. Each tests a different part of the job.<ref name="nist" /> | |||
=== Example with a regular schedule and an exception === | |||
A library's published hours make a small test case. The regular schedule covers most Saturdays, and a holiday notice changes the hours for one date. Giving the assistant both notices directly lets you check how it reads them. If an assistant also searches for sources, a separate test can check whether it finds the right notice. | |||
Give the assistant these two fictional notices. | Give the assistant these two fictional notices. | ||
Latest revision as of 04:48, 24 November 2026
Artificial intelligence (AI) is a field of computer science concerned with building systems that can do things such as recognize patterns, make predictions, plan actions, or generate content.[1] A mail filter can classify incoming messages. A system used in robotics can interpret camera images and plan where to move. A language model can draft a summary of a document. The useful question in each case is what the system has to do and how someone can tell whether it did it well.
This topic brings together learning projects for studying and testing AI. You can add a learning activity that readers in other subjects can reuse.
How AI systems work
The term artificial intelligence appears in a 1955 proposal for a research workshop at Dartmouth College in 1956. The organizers asked how computers might use language, form concepts, and solve problems. Researchers have since tried several approaches. A system can search a space of possible moves, apply rules written by people, learn patterns from examples, or combine these methods. A chess program, for example, can search possible sequences of moves and use a learned model to judge which positions look promising.[2]
In machine learning, training adjusts a model using data and a learning objective. To build a filter for unsolicited mail, a team might train a model on messages labeled as wanted or unwanted. Using the trained model to classify a new message is called inference. The team can evaluate it on messages it held back from training and count two kinds of mistakes. How often did unwanted mail get through? How often did a real message get blocked? The second error may be especially costly for someone waiting on an important reply.[3]
Deep learning uses neural networks with many layers to build representations from data. In a system that recognizes objects in images, earlier layers can respond to simple patterns such as edges. Later layers can combine those patterns into features that help recognize a shape or an object.[4]
Language models and sources
A language model works with tokens, which can be words, parts of words, or punctuation. Many generative language models produce text by repeatedly predicting the next token from the text already available. This makes it possible to write a draft or summarize a passage. A fluent answer can still contain a wrong date or a reference that does not exist. The answer has to be checked against evidence when accuracy matters.[5][6]
Retrieval-augmented generation gives a language model material to consult when it answers a question. The application can search a collection of documents and pass along a relevant passage, such as a current schedule or policy. A reader can then check the answer against the source the system used. Errors are possible at both steps. The search can return an outdated document, and the model can misread a current one.[7]
Evaluating AI answers
An email filter can be tested on messages whose correct labels are already known. An AI assistant that answers from documents can be tested the same way. Pick questions you can check against the documents, and see whether the assistant gets the answer right and points to evidence that supports it. Include an ordinary case, an exception to a rule, and a question the documents leave unanswered. Each tests a different part of the job.[6]
Example with a regular schedule and an exception
A library's published hours make a small test case. The regular schedule covers most Saturdays, and a holiday notice changes the hours for one date. Giving the assistant both notices directly lets you check how it reads them. If an assistant also searches for sources, a separate test can check whether it finds the right notice.
Give the assistant these two fictional notices.
- Regular Saturday schedule, July 2027. Central branch is open on Saturdays from 10 a.m. to 4 p.m. East branch is closed on Saturdays.
- Holiday notice, issued July 1, 2027. Central branch will be closed on Saturday, July 3, for the holiday weekend. This notice applies to July 3 only.
Ask the assistant to answer the questions below using only the two notices and to say which notice supports each answer. Use the right-hand column to check what it says.
| Question to ask | What to look for in the answer |
|---|---|
| What are Central's hours on Saturday, July 10? | 10 a.m. to 4 p.m., from the regular schedule. |
| Is Central open on Saturday, July 3? | Closed for the day, according to the holiday notice. |
| Is East open on Saturday, July 10? | Closed, according to the regular schedule. |
| What time does Central open on Sunday, July 11? | The notices give no Sunday hours. |
If the assistant gives the regular hours for July 3, it missed the exception. If it supplies Sunday hours, it made a claim the notices cannot support. To compare two assistants, give each the same notices and questions in a fresh chat and record where each answer went wrong.
When AI can take action
An AI agent can use tools to carry out parts of a task over several steps. A library assistant might consult a catalog, check availability, and prepare a reservation for someone to approve. The model and the application have different jobs. The application determines which databases the agent can read and which actions require confirmation. Check tool use as well as the finished answer. A reservation made for the wrong branch is a failure even if the confirmation message sounds right.[8]
Where the benefits and costs show up
In education, an AI tool might help turn a long handout into a set of practice questions. Include the teacher's time to check those questions when comparing the result with the usual method. Check whether the materials work for the readers they are meant to serve. An average score can hide worse results for one language or type of question.[6]
There are also questions about how benefits are shared. If a library can make its guides easier to search, people may spend less time finding the right form or office. The outcome depends in part on whether the service is affordable, whether people can use it, and what information they have to give up to get help. Those are practical questions for discussions about technological abundance and access to knowledge.
Learning projects and resources
- Search this wiki for artificial intelligence to find related learning projects.
- Build a small set of practice cases for evaluating AI answers. Include a question with missing information and one where two sources disagree.
Discussion questions, essay ideas, and learning related AI prompt ideas
- What error costs more in the mail filter example? Would the answer change for a school, a hospital, or someone sorting a personal inbox?
- Write a short essay about whether a public library should use AI to answer questions about its services. Specify what evidence would make you change your mind.
- Ask an AI tool to suggest two more questions about the library notices. Work out which answers the notices support, then use the questions to test another assistant.
References
- ↑ OECD, "Updates to the OECD's Definition of an AI System Explained".
- ↑ John McCarthy, Marvin Minsky, Nathaniel Rochester, and Claude Shannon (1955), "A Proposal for the Dartmouth Summer Research Project on Artificial Intelligence".
- ↑ Google for Developers, "Accuracy, Recall, Precision, and Related Metrics", Machine Learning Crash Course.
- ↑ Yann LeCun, Yoshua Bengio, and Geoffrey Hinton (2015), "Deep Learning", Nature, 521, 436-444.
- ↑ Google for Developers, "Introduction to Large Language Models", Machine Learning Crash Course.
- ↑ 6.0 6.1 6.2 National Institute of Standards and Technology (2024), Artificial Intelligence Risk Management Framework: Generative Artificial Intelligence Profile, NIST AI 600-1.
- ↑ Patrick Lewis and colleagues (2020), "Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks", Advances in Neural Information Processing Systems, 33.
- ↑ Anthropic, "Building Effective AI Agents", sections on tool use and agents.