# Przekształcanie zapytań

EN: **Query transformation** · id `queryrewrite`

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [Aplikacje LLM i agenci](https://aiatlasgraph.com/t/applications.md) › [Wyszukiwanie i RAG](https://aiatlasgraph.com/t/retrieval.md) › Przekształcanie zapytań

## Description

- PL: Przepisanie pytania użytkownika, zanim trafi do wyszukiwania.
- EN: Rewriting the user's question before it reaches the search.

## In one sentence

- PL: To zmienianie sformułowania pytania, żeby wyszukiwarka łatwiej znalazła potrzebne informacje.
- EN: This rephrases a question to help a search system find the information you need.

## Problem it solves

- PL: Wyszukiwarka nie znajduje odpowiedzi, gdy pytanie jest skrótowe, niejasne lub zależy od wcześniejszej rozmowy.
- EN: Search misses the answer when your question is brief, unclear or depends on an earlier part of the conversation.

## What it does

- PL: Dopisuje brakujący kontekst rozmowy, proponuje inne słowa lub rozbija złożone pytanie na prostsze poszukiwania.
- EN: It adds missing conversation details, suggests alternative words or splits a complex question into smaller searches.

## Everyday example

- PL: Po rozmowie o zamówieniu pytasz „a kiedy dotrze?”, a asystent dołącza ustalony numer zamówienia do wyszukiwania.
- EN: After discussing an order, you ask “when will it arrive?”, and the assistant adds the order number to its search.

## This concerns you if you…

- PL: zadajesz krótkie pytania odwołujące się do poprzednich wiadomości
- PL: musisz wiele razy zmieniać słowa, żeby coś znaleźć
- EN: ask brief questions that refer to earlier messages
- EN: keep changing search words before you find what you need

## Keywords

query rewriting · HyDE · CoRAG · query decomposition · multi-query retrieval · step-back prompting

## How it works

- PL: Model doprecyzowuje zapytanie, rozbija je na podproblemy lub generuje alternatywne sformułowania do wyszukiwania. Niektóre metody tworzą hipotetyczny dokument i używają jego embeddingu do znalezienia rzeczywistych materiałów.
- EN: The model clarifies a query, splits it into subproblems or generates alternative search formulations. Some methods create a hypothetical document and use its embedding to retrieve actual material.

## Limits

- PL: Przekształcenie może zmienić intencję pytania lub dodać nieprawdziwe założenie. Hipotetyczny tekst jest pomocą wyszukiwania, nie dowodem; dodatkowe wywołania zwiększają koszt i opóźnienie.
- EN: Transformation can change the question's intent or add a false assumption. Hypothetical text is a retrieval aid, not evidence; additional calls increase cost and latency.

## Key terms

- PL: **przepisanie zapytania**: Zmiana sformułowania pytania przed uruchomieniem wyszukiwania.
- PL: **dekompozycja**: Rozbicie pytania na mniejsze zapytania składowe.
- PL: **hipotetyczny dokument**: Wygenerowany przykład odpowiedzi używany do wyszukania prawdziwych materiałów.
- EN: **query rewriting**: Changing a question's wording before running retrieval.
- EN: **decomposition**: Splitting a question into smaller component queries.
- EN: **hypothetical document**: A generated example answer used to retrieve actual material.

## Know first

- [Prompty i kontekst (Prompting and context engineering)](https://aiatlasgraph.com/t/prompting.md)
- [Embeddingi zdań i dokumentów (modele embeddingowe) (Sentence and document embeddings (embedding models))](https://aiatlasgraph.com/t/textembeddings.md)

## Examples

- PL: przepisywanie zapytań · HyDE · CoRAG
- EN: query rewriting · HyDE · CoRAG

## Sources

- [LLM Course (Maxime Labonne)](<https://github.com/mlabonne/llm-course>) `mlabonne-llm-course` · by Maxime Labonne

---

AI Atlas revision 122 (2026-10-30) · HTML: https://aiatlasgraph.com/t/queryrewrite · index: https://aiatlasgraph.com/llms.txt · everything: https://aiatlasgraph.com/llms-full.txt · updated 2026-10-30
