Available models
Typeset offers two AI models:- GPT-4.1 mini
- Gemini 2.5 Flash
OpenAI’s GPT-4.1 mini model provides fast, accurate responses for LaTeX assistance. Best for:
- Quick formatting fixes
- Adding common LaTeX elements
- General LaTeX questions
You can switch between models at any time using the dropdown menu in the chat input area.
Chatting with the AI
The AI assistant appears in the left panel of the interface.Select a model
Choose GPT-4.1 mini or Gemini 2.5 Flash from the dropdown menu at the bottom of the chat panel.
Type your message
Enter your question or request in the text input. The AI has access to your current document, so you can refer to it directly.Examples:
- “Add the Transformer attention formula”
- “Improve formatting of my introduction”
- “How do I create a two-column layout?”
Quick suggestions
When you first open the chat, you’ll see suggested prompts to get started:- “Add Transformer attention formula”
- “Improve formatting”
- “Inspect for errors”
- “How do I write an integral?”
Document edits
When you ask the AI to make changes to your document, it uses theeditFile tool:
AI proposes changes
The AI analyzes your request and creates a modified version of your document. You’ll see an “Editing file…” indicator in the chat.
Review in editor
The editor switches to side-by-side comparison mode, showing your current version and the AI’s suggested version.
The AI always shows you a preview of changes before applying them. Your original document is never modified without your approval.
What the AI knows
The AI assistant has access to:- Your current document - Automatically attached to every message as
main.tex - LaTeX knowledge - Extensive understanding of LaTeX syntax, packages, and best practices
- Conversation history - Previous messages in the current chat session
The AI does not have access to other files in your project or previous chat sessions. Each chat starts fresh.
Best practices
Be specific
Instead of “make it better”, try “improve the introduction by adding a thesis statement and restructuring the paragraphs”.
Ask questions first
If you’re unsure how to do something, ask “How do I…” before requesting changes. The AI can explain the approach.
Review carefully
Always review AI suggestions before accepting. The AI is helpful but can make mistakes or misunderstand complex requests.
Error handling
If something goes wrong:- Rate limit errors - Wait a moment and try again. High demand can temporarily limit requests.
- Connection errors - Check your internet connection and click Retry.
- Unexpected errors - The chat shows an error alert with a Retry button to resend your last message.
Chat controls
- Stop generation - Click the stop button (square icon) to cancel an ongoing AI response
- Scroll to bottom - When new messages arrive, a down arrow appears to help you jump to the latest message
- Multi-line input - Press
Shift + Enterto add line breaks in your message without sending
Understanding AI responses
AI messages support rich formatting:- Markdown - Bold, italic, lists, and headings
- Code blocks - Syntax-highlighted LaTeX snippets
- Math expressions - Inline (
$...$) and block ($$...$$) equations - Status alerts - Special indicators when the AI is editing your file