Skip to main content

Custom prompt templates

The fastest way to change behavior. See the Prompts guide and Custom Prompts examples for full details.

Custom reranker settings

Control how many chunks reach the LLM:

Custom standalone question prompt

Control how follow-up questions are reformulated:

History window

Reduce token usage by keeping fewer past exchanges in context:

Pre-processing questions

Intercept and modify questions before they reach the engine:

Post-processing responses

Wrap chat() to modify or enrich responses:

Accessing the session directly

Manipulate conversation history before a chat call:

Custom routes in API server

Add your own endpoints alongside LangChat’s: