Skip to content

Essays & Personalization

This section covers the new features added for essay personalization, topic extraction, and AI-assisted generation.

1. Get Personalization Questions

Fetch AI-generated personalization questions for a specific essay requirement and topic.

graphql
query GetPersonalizationQuestions($id: ID!, $essayTopicId: ID) {
  scholarships {
    byId(id: $id) {
      requirements {
        ... on RequirementText {
          id
          personalizationQuestions(essayTopicId: $essayTopicId) {
            id
            text
            order
          }
          personalizationAnswers(essayTopicId: $essayTopicId) {
            questionId
            answer
            skipped
          }
        }
      }
    }
  }
}

Variables:

json
{
  "id": "12345",
  "essayTopicId": "topic-abc"
}

2. Upsert Personalization Answer

Save the user's response or skip a personalization question.

graphql
mutation UpsertAnswer($input: UpsertEssayPersonalizationAnswerInput!) {
  scholarships {
    upsertEssayPersonalizationAnswer(input: $input) {
      answer {
        questionId
        answer
        skipped
      }
    }
  }
}

Variables:

json
{
  "input": {
    "questionId": "q-123",
    "answer": "I have been volunteering for 3 years.",
    "skipped": false
  }
}

3. Generate an Essay

Request an AI-generated essay using the provided topic and personalization context.

graphql
mutation GenerateEssay($input: GenerateEssayInput!) {
  scholarships {
    generateEssay(input: $input) {
      text
    }
  }
}

Variables:

json
{
  "input": {
    "requirementId": "req-789",
    "essayTopicId": "topic-abc"
  }
}

4. Diff AI vs User Essay

Compare the AI-generated original text with the user's manually edited text.

graphql
mutation EssayDiff($input: GenerateEssayDiffInput!) {
  scholarships {
    generateEssayDiff(input: $input) {
      diff
    }
  }
}

Variables:

json
{
  "input": {
    "aiGeneratedText": "This is the original AI essay.",
    "userEditedText": "This is the original AI essay with my personal edits."
  }
}

OwlFlow Developer Portal