Description
Enhance the application's functionality to allow users to load and compare datasets from multiple candidates. This will enable users to query and compare different candidates directly on the prompt page.
Tasks
-
Modify Data Models
- Ensure that datasets can be associated with multiple candidates.
- Update existing models if necessary to support multi-candidate data.
-
Update Prompt Page UI
- Modify the prompt page to allow users to select datasets from multiple candidates.
- Implement multi-select functionality for candidate datasets.
- Example UI changes:
<label for="candidates">Select Candidates:</label>
<select id="candidates" name="candidates" multiple>
{% for candidate in candidates %}
<option value="{{ candidate.id }}">{{ candidate.name }}</option>
{% endfor %}
</select>
-
Backend Support for Multi-Candidate Queries
- Update backend logic to handle queries with multiple candidate datasets.
- Ensure the query is constructed in a way that incorporates data from all selected candidates.
-
Update Query Processing
- Modify the query processing pipeline to aggregate and compare data from multiple candidates.
- Example pseudocode:
selected_candidates = request.form.getlist('candidates')
data_content = "\n\n".join([get_data(candidate_id) for candidate_id in selected_candidates])
-
Display Comparison Results
- Ensure the response includes comparative data across selected candidates.
- Update the UI to display the results in a clear and comparative format.
- Example result display changes:
<table>
<thead>
<tr>
<th>Question</th>
{% for candidate in selected_candidates %}
<th>{{ candidate.name }}</th>
{% endfor %}
</tr>
</thead>
<tbody>
{% for query in queries %}
<tr>
<td>{{ query.question }}</td>
{% for candidate in selected_candidates %}
<td>{{ query.get_response(candidate.id) }}</td>
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>
-
Testing and Validation
- Test multi-candidate selection on the prompt page.
- Validate that queries and comparisons work correctly with multiple candidates.
- Ensure that the UI renders comparative results clearly.
Additional Notes
- Ensure data consistency and handle edge cases where data from some candidates might be missing.
- Provide documentation or tooltips to guide users on how to select multiple candidates and understand comparison results.
Ai gen'd from my chaos scratch notes
Description
Enhance the application's functionality to allow users to load and compare datasets from multiple candidates. This will enable users to query and compare different candidates directly on the prompt page.
Tasks
Modify Data Models
Update Prompt Page UI
Backend Support for Multi-Candidate Queries
Update Query Processing
Display Comparison Results
Testing and Validation
Additional Notes
Ai gen'd from my chaos scratch notes