liveBook · Manning

SQL

As explained in Software Testing with Generative AI

A request for information or matching items from a data collection or information-retrieval system.

A query is a user request that guides retrieval of relevant data for an LLM prompt. In RAG, the query connects a testing need to supporting documents such as user stories. section 11.1 section 11.4

A useful query-driven RAG flow:

  • Accept a focused testing request, such as asking for ideas about deleting bookings. section 11.1
  • Retrieve documents judged relevant by a library, tool, or similarity algorithm. section 11.4 section 11.1
  • Combine the query and retrieved content in a prompt so the LLM can produce more contextual testing risks. section 11.1

Testing an API payload

The query “I want test ideas for the payload portion of the PUT branding endpoint” retrieves a user story and acceptance criteria. The resulting suggestions include missing parameters, invalid data types, invalid JSON, absent cookies, and incorrect endpoint formatting. section 11.2.2

{
  "name": "string",
  "map": {
    "latitude": 0,
    "longitude": 0
  },
  "logoUrl": "string",
  "description": "string",
  "contact": {
    "name": "string",
    "address": "strings",
    "phone": "string",
    "email": "string"
  }
}

Inspect the JSON payload structure retrieved as supporting context for the branding-endpoint query. section 11.2.2

How Software Testing with Generative AI covers it

How deep it goes
Explains input, relevance matching, document insertion, and context-window rationale, but not similarity-algorithm internals.
Examples
Uses deleting-bookings and PUT-branding testing requests, retrieved user stories, acceptance criteria, and a JSON payload schema.
What it assumes
Assumes familiarity with prompts and testing requests while introducing retrieval, relevance selection, and contextual document inclusion.
What you can do after
Apply it via RAG to retrieve focused testing context and request more accurate, risk-oriented LLM suggestions.
How it connects
Connects queries to retrieval-augmented generation, prompts, user stories, similarity algorithms, vector databases, and context windows.

Also explained in

Compare how 25 books explain SQL →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Software Testing with Generative AI. The section links point to the parts of the book it draws on.