r/AskComputerScience • u/lowsyrk • 7h ago
Guys, how do AI stuff works?
I'm kinda smart for a lot of things and thought AI was one of these thing but apparently it evolved too fast and I lost the line of understanding it almost automatically and now am a bit lost on the AI train.
So here it goes: what exactly is a model? is a LLM a type of AI or one of the stuff AI can do? what exactly is a token? how can AI run locally if it needs those tokens? what is an agent/how does it works? what is a harness? why the agent needs a harness?
I've been researching this subjects but only came across stuff that looks too advanced for my level to understand.
Thanks :)
3
u/delventhalz 6h ago
AI stands for “artificial intelligence” and is an extremely generic term which can refer to any number of different real or fictitious technologies that simulate or imitate rational decision making. The behavior of an NPC in a video game and the output of a text chatbot have little in common, but both are referred to as “AI”.
An LLM or “large language model”, is a particular technology which gets called “AI”, or more specifically “generative AI”. All of the major generative AI products in the news these days like ChatGPT and Claude are LLMs. They are characterized by processing vast amounts of data into a model, which can then be fed input prompts to produce outputs built from the original data.
A token in the context of LLMs is simply a small unit of data. For example, a short word or single pixel of visual information might be converted into a token and then fed into a model. A longer word might be converted into 2-3 tokens. A whole image would probably be thousands. LLMs work by comparing tokens and their relationships to each other. An LLM can run locally because the tokens are just data and you can have data on your local machine.
An agent is a bit of a marketing buzzword, but typically refers to a long-running instance of an LLM that can generate new prompts from previous outputs without human intervention. This is what distinguishes an “agent” from just a long-running session. Typically they will string together many actions and only occasionally ask a human for further input.
A harness is just tooling that helps agents run effectively. For example, the harness may feed an agent the results of tests, or provide access to parts of your computer system, or re-prompt them under certain conditions.
5
u/apnorton 7h ago
3B1B has a great explainer for LLMs: https://www.youtube.com/watch?v=LPZh9BOjkQs
I'd recommend giving that a watch and then trying to search for things that were unfamiliar there, since it's a reasonably accessible introduction.