Skip to main content
Evaly’s AI-powered question generation helps you create comprehensive tests quickly by analyzing your content and generating relevant questions automatically.

How AI Generation Works

Evaly uses Google Gemini AI to analyze your source material and generate questions that match your specifications:
1

Provide Source Material

Upload a PDF document, paste text, or describe the topic conversationally.
2

Specify Requirements

Set the number of questions, difficulty level, and question types you want.
3

AI Generates Questions

Gemini analyzes your content and creates questions with answer options.
4

Review and Refine

Review generated questions, edit as needed, or ask AI to regenerate.
5

Add to Test

Save questions to your library or add directly to a test section.

Input Methods

PDF Upload

Upload course materials, textbooks, or study guides:
// Files uploaded to R2 storage
key: "ai-questions/{uuid}.pdf"
// AI extracts and analyzes text content
// Generates questions based on document content
PDF files are stored in the ai-questions/ folder and automatically processed for text extraction.

Text Input

Paste or type your content directly:
  • Lecture notes
  • Study materials
  • Article excerpts
  • Custom content

Conversational Prompts

Describe what you need in natural language:
  • “Create 10 questions about World War II”
  • “Generate multiple choice questions on photosynthesis for high school students”
  • “Make challenging questions about Python programming concepts”

AI Threads and Refinement

Each generation session creates an AI thread that maintains conversation context:

Thread Structure

aiThreads: {
  organizationId: string
  questionLibraryId: string // Where questions are saved
  createdAt: number
  metadata: object // Original prompt, settings, etc.
}

aiThreadMessages: {
  threadId: string
  role: "user" | "assistant"
  content: string
  timestamp: number
}

Iterative Refinement

Continue the conversation to refine questions:
  • “Make question 3 easier”
  • “Add more questions about cell division”
  • “Change the difficulty to intermediate”
  • “Generate variations of question 5”
The AI maintains context from previous messages, allowing you to refine questions without starting over.

Generated Question Library

Questions are saved to a dedicated library for each AI thread:

Library Features

  • Isolated Storage: Each generation session creates a separate library
  • Editable Questions: Modify generated questions before using them
  • Reusable: Add questions to multiple tests
  • Deletable: Remove questions you don’t want
questionLibrary: {
  title: "AI Generated Questions"
  organizationId: string
  questionCount: number
  createdByOrganizerId: string
}

// Questions reference the library
question: {
  referenceId: questionLibraryId
  organizationId: string
  type: "multiple-choice" | "yes-or-no" | ...
  question: string
  options: [...]
}

Managing Generated Questions

Browse all questions generated in a thread:
  • Sorted by creation order
  • Preview question text and options
  • See correct answers marked
  • Filter by question type

Usage Limits

AI question generation is limited by your subscription plan:

Free Plan

5 generations/monthTrack usage in settings

Pro Plan

50 generations/monthHigher limits for power users

Enterprise

UnlimitedNo restrictions
// Usage tracking
organizationUsage: {
  aiQuestionGeneration: 3 // Current month count
}

// Limit enforcement
if (usage.aiQuestionGeneration >= limits.aiQuestionGeneration) {
  throw new ConvexError({
    message: "Monthly AI generation limit reached",
    code: "USAGE_LIMIT_EXCEEDED",
    display: "dialog",
    action: "Upgrade Plan"
  });
}
Usage resets on the first day of each month. Generations in progress when the limit is reached will complete but count toward next month.

AI Thread History

Access all previous generation sessions:
  • Recent Threads: Last 50 threads shown by default
  • Thread Details: View original prompt and settings
  • Question Count: See how many questions each thread generated
  • Resume Threads: Continue refining previous generations
// Fetching organization threads
getOrganizationThreads: {
  // Returns last 50 threads with libraries
  threads: [{
    _id: string
    questionLibraryId: string
    library: {
      title: string
      questionCount: number
    }
    metadata: object
  }]
}

File Management

PDF Upload Flow

1

Generate Upload URL

Request a pre-signed URL for direct R2 upload:
generateAiQuestionPdfUploadUrl() → {
  url: string,
  key: "ai-questions/{uuid}.pdf"
}
2

Upload to R2

Client uploads PDF directly to Cloudflare R2 using the pre-signed URL.
3

Process Content

AI extracts text from PDF and analyzes for question generation.
4

Generate Questions

Gemini creates questions based on PDF content and your specifications.

Storage Location

All AI-generated content files are stored in the ai-questions/ folder:
R2 Bucket Structure:
├── ai-questions/
│   ├── {uuid-1}.pdf
│   ├── {uuid-2}.pdf
│   └── {uuid-3}.pdf
├── test-media/
└── uploads/

Best Practices

  • Use clear, well-structured content
  • Include key concepts and definitions
  • Provide sufficient context for complex topics
  • Break long documents into sections
  • Ensure PDFs are text-based (not scanned images)
  • Be specific about question count and types
  • Specify difficulty level and audience
  • Mention topics to focus on or avoid
  • Include example questions if you have a style preference
  • Start broad, then refine with follow-up prompts
  • Always review for accuracy and clarity
  • Check that correct answers are properly marked
  • Verify distractors are plausible but incorrect
  • Ensure questions align with learning objectives
  • Edit wording for your audience level
  • Generate larger batches to use credits efficiently
  • Refine questions in the same thread instead of starting new ones
  • Save good prompts for reuse
  • Monitor monthly usage to plan generations
  • Consider upgrading if you regularly hit limits

Example Workflows

From Course Materials

  1. Upload lecture notes PDF
  2. Prompt: “Create 20 multiple-choice questions covering the main concepts”
  3. Review generated questions
  4. Refine: “Make questions 5-8 more challenging”
  5. Add questions to test sections

Topic-Based Generation

  1. No upload needed
  2. Prompt: “Generate 15 questions about the American Revolution for 8th graders”
  3. Review and edit
  4. Refine: “Add 5 more questions specifically about the Boston Tea Party”
  5. Save to library for future use

Mixed Question Types

  1. Paste study guide text
  2. Prompt: “Create 10 multiple choice, 5 true/false, and 3 short answer questions”
  3. AI generates varied question types
  4. Review each type separately
  5. Organize into appropriate test sections

Limitations and Considerations

AI-generated questions should always be reviewed by a human before use in high-stakes assessments.
  • Accuracy: AI may occasionally generate incorrect information
  • Context: AI lacks real-world context for highly specialized topics
  • Bias: Be aware of potential biases in training data
  • Creativity: AI may produce formulaic questions without human review
  • Updates: AI knowledge has a cutoff date and may miss recent developments

Next Steps

Edit Questions

Refine AI-generated questions with the editor

Create Tests

Add generated questions to your tests

Question Libraries

Organize and reuse question collections

Billing

Upgrade for higher AI generation limits

Build docs developers (and LLMs) love