Reference
AI glossary for Ruby on Rails teams
The vocabulary of AI enablement and legacy modernization, defined in plain language — with a note on what each term means inside a Rails application.
Strategy
- AI enablement
- The work of making a company and its software able to use AI productively: choosing use cases with measurable value, preparing data, integrating models into existing workflows, adding guardrails and training the team that will own the result.
- In a Rails app: It usually means adding an AI layer to the existing monolith rather than building a separate system. See AI integration and automation.
- AI transformation
- A sustained, organization-wide change in how products are built and operations run, driven by AI. Enablement is how it starts; transformation is the cumulative result of many successful use cases.
- In a Rails app: See AI transformation and strategy.
- AI readiness
- How prepared an application, its data and its team are to adopt AI. It is typically assessed across codebase, data, architecture, infrastructure, security and team.
- In a Rails app: Outdated Ruby and Rails versions and missing tests are the most common blockers. See the AI Readiness Assessment.
- AI-native
- A product or company in which AI is part of the core workflow rather than an add-on feature, and which improves continuously from real usage.
Models
- Large language model (LLM)
- A neural network trained on large amounts of text that can generate and transform language. Applications use LLMs through an API to draft, summarize, classify, extract and reason over text.
- In a Rails app: Models are called from service objects or background jobs, through a provider SDK or a Ruby library such as RubyLLM, ruby-openai or langchainrb.
- Token
- The unit of text a language model reads and writes — roughly a short word or a piece of a longer one. Model usage is both priced and limited in tokens.
- Context window
- The maximum amount of text, measured in tokens, that a model can consider in a single request. It includes the instructions, any retrieved data and the conversation so far.
- Prompt
- The instructions and data sent to a model for one request. Prompt quality has a large effect on output quality.
- In a Rails app: Treat prompts as code: keep them in the repository, version them, review changes and cover them with evals.
- Structured output
- A model response constrained to a defined schema, usually JSON, so that software can consume it reliably instead of parsing free text.
- In a Rails app: Validate the result with your normal model validations before saving anything.
- Streaming
- Sending a model response to the user piece by piece as it is generated, instead of waiting for the full answer. It makes AI features feel much faster.
- In a Rails app: Turbo Streams over Action Cable handles this without a separate frontend framework.
- Open-weight model
- A model whose trained weights are published, so it can be run on your own infrastructure. Used when data must not leave your environment or to control cost at high volume.
- Fine-tuning
- Further training an existing model on your own examples to specialize its behaviour. It is usually considered only after better prompts and retrieval have been tried.
Retrieval
- Embedding
- A list of numbers (a vector) that represents the meaning of a piece of text, so that texts with similar meaning end up close together. Embeddings are the basis of semantic search and RAG.
- In a Rails app: Embeddings are generated in background jobs and stored in a vector column on the record they describe.
- Vector database
- A database that stores embeddings and quickly finds the ones nearest to a query vector.
- In a Rails app: PostgreSQL with pgvector is usually enough, which avoids running and syncing a separate system.
- pgvector
- An open-source PostgreSQL extension that adds a vector column type and similarity search, turning an existing Postgres database into a vector database.
- In a Rails app: With the neighbor gem, Active Record models can run nearest-neighbor queries and combine them with ordinary scopes.
- Retrieval-augmented generation (RAG)
- A technique in which relevant documents or records are retrieved from your own data and supplied to the model together with the question, so the answer is grounded in that data rather than only in what the model learned during training.
- In a Rails app: Retrieval should run through your existing authorization scopes so users only get answers from records they are allowed to see.
- Chunking
- Splitting long documents into smaller passages before embedding them, so retrieval can return the precise part that answers a question.
- Semantic search
- Search by meaning rather than exact keywords, using embeddings. A query for "cancel my plan" can find an article titled "Ending your subscription".
- Hybrid search
- Combining semantic (vector) search with traditional keyword search and merging the results. It handles both vague questions and exact terms such as product codes.
- In a Rails app: PostgreSQL full-text search and pgvector can be combined in a single query.
Agents and automation
- AI agent
- A system in which a language model decides which steps to take and which tools to call, in a loop, to accomplish a goal.
- In a Rails app: An agent run is a background job with a clear stopping condition. Its tools are your existing service objects.
- Tool calling (function calling)
- A model capability in which the model asks the application to run a named function with specific arguments, then uses the result to continue. It is how models take actions and fetch live data.
- Model Context Protocol (MCP)
- An open standard for connecting AI assistants to external tools and data. An MCP server exposes tools and resources; MCP clients such as AI assistants and code editors can then use them.
- In a Rails app: A Rails application can expose an MCP server alongside its regular API, so customers can use the product from their AI assistant.
- AI automation
- Running multi-step business processes with little or no manual effort, including steps that used to need human judgment such as classifying, extracting or drafting.
- Human-in-the-loop
- A design in which a person reviews or approves AI output before it takes effect. It is the standard safeguard for decisions that are costly or hard to undo.
Quality and safety
- Evals (evaluations)
- Automated tests that score the quality of AI output against a set of examples. Evals are to AI features what a test suite is to regular code.
- In a Rails app: Evals run in CI next to your RSpec or Minitest suite, so a prompt or model change cannot silently lower quality.
- Guardrails
- Checks around a model that constrain what goes in and what comes out: input validation, permission checks, output validation, content filters, and rate and cost limits.
- Hallucination
- Model output that is fluent and confident but false or unsupported by the available data. It is reduced with retrieval, validation and citations, and caught with evals and human review.
- Prompt injection
- An attack in which text the model reads — a user message, a web page, an uploaded document — contains instructions that hijack its behaviour. Defenses include least-privilege tools, separating instructions from data, and approval for sensitive actions.
- LLM observability
- Recording every model call — prompt version, model, tokens, latency, cost and outcome — so that quality and spend can be monitored and problems debugged.
Modernization
- Legacy application
- A system that is still valuable to the business but has become costly or risky to change, typically because of outdated versions, missing tests and accumulated technical debt.
- Legacy modernization
- The incremental process of bringing an aging application up to current standards — supported versions, reliable tests, clear architecture — without stopping feature delivery or rewriting it from scratch.
- In a Rails app: See legacy Rails modernization.
- Technical debt
- The accumulated cost of earlier shortcuts and outdated decisions in a codebase, paid as slower and riskier changes later.
- Dual booting
- Running the same application against two versions of a framework from one codebase, so an upgrade can be worked on incrementally while production stays on the current version.
- In a Rails app: It is the standard technique for low-risk Rails upgrades.
- Strangler fig pattern
- Replacing a legacy system gradually by building new functionality around it and moving behaviour to the new code piece by piece, until the old part can be removed.
- Characterization test
- A test that records what existing code actually does today, rather than what it should do. It makes refactoring untested legacy code safe.
- Domain-Driven Design (DDD)
- An approach to software design that models code around the business domain, using a shared language between developers and domain experts and explicit boundaries called bounded contexts.
- In a Rails app: Clear bounded contexts also give AI agents a well-defined, safe set of operations to work with. See DDD workshops.
- Event sourcing
- Storing the state of a system as an append-only sequence of events instead of only the current values. It provides a complete audit trail of what happened and why.
- In a Rails app: An event log is valuable context for AI and makes AI-assisted decisions traceable.
Put it to work