Skip to content

num_recommendations parameter not exposed in frontend UI #6

@gzark1

Description

@gzark1

Description

The backend API supports a num_recommendations parameter (3-10 courses per request), but the frontend never passes it and has no UI for users to customize this value.

Steps to Reproduce

  1. Open the recommendations chat interface
  2. Submit a query or click "Recommend Based on Profile"
  3. Observe that you always receive 5 recommendations

Expected Behavior

Users should be able to specify how many recommendations they want (3-10), or the system should clearly document that 5 is the fixed count.

Actual Behavior

  • Backend accepts num_recommendations with range 3-10, default 5
  • Frontend type defines num_recommendations?: number but never sends it
  • No UI control exists for users to change the count
  • Users always get 5 recommendations with no option to adjust

Root Cause

  • frontend/src/features/recommendations/components/recommendation-chat.tsx:79 - only passes { query }
  • frontend/src/features/recommendations/components/recommendation-chat.tsx:94 - passes {}
  • frontend/src/features/recommendations/components/recommendation-input.tsx - no input control for count

Possible Solutions

  1. Option A - Implement in frontend: Add a slider/dropdown (3-10) in the recommendation input component and pass num_recommendations in the API request

  2. Option B - Remove from backend: Remove the parameter from RecommendationRequest schema and hardcode 5 throughout, simplifying the API

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions