Skip to content

[Feature]: Add AI-powered cognitive reframing suggestions using CBT techniques — surface evidence-based reframes for negative thought patterns #1733

Description

@divyanshim27

Summary

A "reframe" app presumably helps users reframe negative thoughts or situations. If the reframing suggestions are user-generated or generic, adding AI-powered CBT (Cognitive Behavioral Therapy) technique suggestions would dramatically increase the platform's value. The AI can identify cognitive distortions in user-submitted thoughts and suggest specific CBT reframes.

Problem

  • Reframing suggestions may be user-generated or templated without cognitive science grounding.
  • Users who don't know CBT techniques cannot identify their own cognitive distortions.
  • Generic positivity reframes ("look on the bright side") are less effective than technique-specific ones (decatastrophizing, cognitive defusion, evidence examination).

Impact

  • Users with genuine negative thought patterns benefit less from generic reframes.
  • The platform's therapeutic value is limited without evidence-based technique scaffolding.

Proposed Solution

REFRAME_SYSTEM_PROMPT = """You are a CBT-informed thinking coach. When given a negative thought, 
identify the cognitive distortion present (catastrophizing, all-or-nothing thinking, mind reading, etc.) 
and provide 3 specific, grounded reframes using named CBT techniques. Be compassionate and non-clinical.
Do not provide therapy — provide perspective tools."""

async def get_ai_reframes(thought: str) -> List[Reframe]:
    response = await openai.chat.completions.create(
        model="gpt-4o-mini",
        messages=[
            {"role": "system", "content": REFRAME_SYSTEM_PROMPT},
            {"role": "user", "content": f"Thought to reframe: {thought}"}
        ]
    )
    return parse_reframes(response.choices[0].message.content)

With a clear disclaimer that this is not a substitute for professional mental health support.

I would be happy to implement this. Could you assign this issue to me?

Labels: feature, ai, mental-wellness, GSSoC 2026

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementImprovement to existing functionalityfeatureNew feature requesttype:featureNew feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions