11 phase 3 flow 2 recommendation engine#12
Conversation
…ement work styles looking for deviations form their author's style profile
…s and time-based suggestions
…t test failures in Github CI workflow
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 31 out of 34 changed files in this pull request and generated 11 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/agentic_librarian/db/models.py
Outdated
|
|
||
| narrator_id: Mapped[UUID] = mapped_column(ForeignKey("narrators.id"), primary_key=True) | ||
| style_id: Mapped[UUID] = mapped_column(ForeignKey("styles.id"), primary_key=True) | ||
| attribute_type: Mapped[str] = mapped_column(String, nullable=False) # 'voice_differentiation', etc. |
There was a problem hiding this comment.
The attribute_type field is not part of the primary key for NarratorStyle. Without including attribute_type in the primary key, a narrator can only have one style per style_id, but narrators should be able to have different styles for different attributes (e.g., both 'pacing' and 'voice_differentiation'). The primary key should include attribute_type.
| attribute_type: Mapped[str] = mapped_column(String, nullable=False) # 'voice_differentiation', etc. | |
| attribute_type: Mapped[str] = mapped_column(String, primary_key=True, nullable=False) # 'voice_differentiation', etc. |
|
|
||
| # 2. Style Search | ||
| if target_styles: | ||
| s_embeddings = [sm._get_embedding(s) for s in target_styles] |
There was a problem hiding this comment.
Generating embeddings for each style on every search request could become a performance bottleneck. For frequently searched styles, consider implementing a cache for these embeddings to avoid redundant API calls to the embedding service.
…ts into integration and unit
…, minimize API calls, and maximize Style flexibility. Refactored test mocks to appropriately interact with these improvements
|
All review items were copied to Gemini CLI and fixed in the |
No description provided.