-
Notifications
You must be signed in to change notification settings - Fork 17
ECHO-366-Update-default-library-generation-prompt-to-recurring-themes #238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ECHO-366-Update-default-library-generation-prompt-to-recurring-themes #238
Conversation
…emes - Introduced a new function `render_message` in prompts.py to render message templates and validate keys. - Added prompt templates for recurring themes in multiple languages (English, Dutch, German, Spanish, French) to enhance conversation analysis capabilities. - Updated tasks.py to utilize the new `render_message` function for generating messages based on the recurring themes template.
|
Caution Review failedThe pull request is closed. WalkthroughThis change introduces a new JSON-based templating system for prompts, adds language-specific JSON templates for recurring themes, and updates the project library creation logic to use these new templates. The configuration is extended to support a dedicated JSON templates directory, and all hardcoded prompt logic is replaced with dynamic template rendering. Changes
Sequence Diagram(s)sequenceDiagram
participant Task as task_create_project_library
participant Prompts as render_json
participant Config as JSON_TEMPLATES_DIR
participant Templates as JSON Template Files
Task->>Prompts: render_json(view_name, lang, ctx, keys)
Prompts->>Config: Get JSON_TEMPLATES_DIR
Prompts->>Templates: Load template for view_name.lang.jinja
alt Template exists
Prompts->>Prompts: Render with ctx
else Fallback
Prompts->>Templates: Load template for view_name.en.jinja
Prompts->>Prompts: Render with ctx
end
Prompts->>Prompts: Parse rendered string as JSON
Prompts->>Prompts: Validate required keys
Prompts-->>Task: Return JSON dict (user_query, user_query_context)
Task->>Task: Use values to create view
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes LGTM. Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
Hi ! Thank you for contributing to Dembrane ECHO! Before we consider your Pull Request, we ask that you sign our Contributor License Agreement (CLA). This is only required for your first Pull Request. Please review the CLA, and sign it by adding your GitHub username to the contributors.yml file. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (7)
echo/server/dembrane/prompts.py(2 hunks)echo/server/dembrane/tasks.py(2 hunks)echo/server/prompt_templates/default_view_reccuring_themes.de.jinja(1 hunks)echo/server/prompt_templates/default_view_reccuring_themes.en.jinja(1 hunks)echo/server/prompt_templates/default_view_reccuring_themes.es.jinja(1 hunks)echo/server/prompt_templates/default_view_reccuring_themes.fr.jinja(1 hunks)echo/server/prompt_templates/default_view_reccuring_themes.nl.jinja(1 hunks)
🧰 Additional context used
🧠 Learnings (2)
echo/server/prompt_templates/default_view_reccuring_themes.fr.jinja (1)
Learnt from: ussaama
PR: #169
File: echo/frontend/src/locales/fr-FR.po:1880-1882
Timestamp: 2025-05-30T15:37:52.403Z
Learning: In French technical contexts, especially AI/ML domains, English technical terms like "prompt" are commonly adopted and used without translation. This is acceptable and not considered an error.
echo/server/dembrane/prompts.py (2)
Learnt from: ArindamRoy23
PR: #113
File: echo/server/dembrane/postgresdbmanager.py:23-40
Timestamp: 2025-04-18T08:45:19.122Z
Learning: Environment variables in the Echo project are defined and validated in config.py and should be imported from there rather than accessing os.environ directly in other modules. This ensures consistent validation, default values, and logging throughout the application.
Learnt from: ArindamRoy23
PR: #113
File: echo/server/dembrane/postgresdbmanager.py:23-40
Timestamp: 2025-04-18T08:45:19.122Z
Learning: Environment variables in the Echo project are defined and validated in config.py and should be imported from there rather than accessing os.environ directly in other modules. This ensures consistent validation, default values, and logging throughout the application.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Cursor Bugbot
- GitHub Check: ci-check-server
🔇 Additional comments (6)
echo/server/dembrane/prompts.py (1)
17-19: LGTM on the imports!Clean addition of
jsonandOptional- exactly what we need for the new JSON parsing functionality.echo/server/prompt_templates/default_view_reccuring_themes.fr.jinja (1)
1-4: French template is 100x qualityExcellent technical translation that maintains precision across all the dataset processing guidelines. The JSON structure is consistent and the French terminology is appropriate for the AI/ML domain.
echo/server/prompt_templates/default_view_reccuring_themes.nl.jinja (1)
1-4: Dutch template maintains the high standardClean Dutch translation that preserves all the technical nuances. The dataset size specifications and quality thresholds are properly localized.
echo/server/prompt_templates/default_view_reccuring_themes.de.jinja (1)
1-4: German template rounds out the multilingual set perfectlySolid German translation that maintains technical precision. The complete multilingual template set provides excellent coverage for the recurring themes analysis functionality.
echo/server/dembrane/tasks.py (2)
26-26: Clean import of the new render_message function.LGTM! The import is properly placed and follows the existing import structure. This enables the template-based approach for prompt generation.
617-627: ✅ 100x Verification Complete:render_messageSignature Matches ExpectationsLGTM on the template-based prompt system—this is rocket-fuel refactoring!
• echo/server/dembrane/prompts.py
- Defines
which perfectly accepts your calldef render_message( prompt_name: str, language: str, kwargs: dict[str, Any], keys_to_validate: Optional[list[str]] = None, ) -> dict[str, Any]:
render_message(view_name, language, {}, ["user_query", "user_query_context"])No further changes needed—approving this stellar refactor! 🚀
- Typo corrected
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (7)
echo/server/dembrane/prompts.py(2 hunks)echo/server/dembrane/tasks.py(2 hunks)echo/server/prompt_templates/default_view_recurring_themes.de.jinja(1 hunks)echo/server/prompt_templates/default_view_recurring_themes.en.jinja(1 hunks)echo/server/prompt_templates/default_view_recurring_themes.es.jinja(1 hunks)echo/server/prompt_templates/default_view_recurring_themes.fr.jinja(1 hunks)echo/server/prompt_templates/default_view_recurring_themes.nl.jinja(1 hunks)
🧰 Additional context used
🧠 Learnings (2)
echo/server/dembrane/prompts.py (2)
Learnt from: ArindamRoy23
PR: #113
File: echo/server/dembrane/postgresdbmanager.py:23-40
Timestamp: 2025-04-18T08:45:19.122Z
Learning: Environment variables in the Echo project are defined and validated in config.py and should be imported from there rather than accessing os.environ directly in other modules. This ensures consistent validation, default values, and logging throughout the application.
Learnt from: ArindamRoy23
PR: #113
File: echo/server/dembrane/postgresdbmanager.py:23-40
Timestamp: 2025-04-18T08:45:19.122Z
Learning: Environment variables in the Echo project are defined and validated in config.py and should be imported from there rather than accessing os.environ directly in other modules. This ensures consistent validation, default values, and logging throughout the application.
echo/server/prompt_templates/default_view_recurring_themes.fr.jinja (1)
Learnt from: ussaama
PR: #169
File: echo/frontend/src/locales/fr-FR.po:1880-1882
Timestamp: 2025-05-30T15:37:52.403Z
Learning: In French technical contexts, especially AI/ML domains, English technical terms like "prompt" are commonly adopted and used without translation. This is acceptable and not considered an error.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Cursor Bugbot
- GitHub Check: ci-check-server
🔇 Additional comments (8)
echo/server/prompt_templates/default_view_recurring_themes.en.jinja (1)
1-4: LGTM! Solid prompt engineering fundamentals 100xClean JSON structure with comprehensive instructions. The output range specifications and quality thresholds show proper prompt engineering - this is how you architect scalable AI workflows.
echo/server/prompt_templates/default_view_recurring_themes.es.jinja (1)
1-4: LGTM! Proper i18n implementation 100xSpanish localization maintains all the technical precision of the original. Dataset size specs and quality thresholds correctly preserved - this is how you scale AI systems globally.
echo/server/prompt_templates/default_view_recurring_themes.fr.jinja (1)
1-4: LGTM! French localization on point 100xExcellent translation work - maintains all technical specs while reading naturally in French. The "Seuil de qualité" translation for quality threshold is spot-on for technical documentation.
echo/server/prompt_templates/default_view_recurring_themes.de.jinja (1)
1-4: LGTM! German localization engineered right 100xSolid technical German translation - "Qualitätsschwelle" and "Verarbeitungsrichtlinien" show proper technical vocabulary. All dataset specs preserved perfectly.
echo/server/dembrane/prompts.py (2)
17-19: LGTM! Clean import additions 100xAdding json and Optional typing - exactly what you need for the new functionality. No bloat, just the essentials.
92-123: LGTM! Solid function architecture 100xThis
render_messagefunction is engineered right - leverages existingrender_prompt, adds clean JSON parsing + validation. The error handling approach with logging and the missing_keys validation (lines 116-121) shows you incorporated previous feedback perfectly. This is how you build robust template systems.echo/server/prompt_templates/default_view_recurring_themes.nl.jinja (1)
1-4: Template looks solid – just ship it.Keys align with the contract expected by
render_message, JSON is valid, Dutch copy is crisp.
LGTM.echo/server/dembrane/tasks.py (1)
629-636: Emptymessageslist ⇒ runtime blow-up.
group([]).run()will raiseValueError: need at least one message. Guard for that edge-case so the actor exits gracefully when no view could be prepared.
- Introduced a new directory for JSON templates and updated the configuration to include `JSON_TEMPLATES_DIR`. - Refactored the `render_message` function to `render_json`, enabling the rendering of JSON templates for recurring themes. - Updated relevant imports and function calls in `tasks.py` to utilize the new `render_json` function.
…ration-prompt-to-recurring-themes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
♻️ Duplicate comments (2)
echo/server/dembrane/tasks.py (1)
614-628: Solid refactor from hardcoded to dynamic templates.The migration from static dictionary prompts to JSON template rendering is 100x cleaner. Template validation with required keys ensures contract compliance.
However, the render_json call lacks error handling - any template rendering failures will bubble past the existing try/except, leaving status_ctx showing "Successfully created library" even when no views actually get created. Consider wrapping the render_json call in a try/except block to catch template errors and update the status appropriately.
echo/server/dembrane/prompts.py (1)
99-143: render_json function implementation is 100x.Solid function design with language fallback, JSON parsing with detailed error handling, and key validation. The error messages are actionable and include context.
The key validation fix from past reviews is properly implemented - now shows only missing keys rather than the full validation list, making debugging much cleaner.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (8)
echo/server/dembrane/config.py(1 hunks)echo/server/dembrane/prompts.py(2 hunks)echo/server/dembrane/tasks.py(2 hunks)echo/server/json_templates/default_view_recurring_themes.de.jinja(1 hunks)echo/server/json_templates/default_view_recurring_themes.en.jinja(1 hunks)echo/server/json_templates/default_view_recurring_themes.es.jinja(1 hunks)echo/server/json_templates/default_view_recurring_themes.fr.jinja(1 hunks)echo/server/json_templates/default_view_recurring_themes.nl.jinja(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Cursor Bugbot
- GitHub Check: ci-check-server
🔇 Additional comments (5)
echo/server/json_templates/default_view_recurring_themes.en.jinja (1)
1-4: LGTM! Clean template architecture for theme analysis.This template structure is 100x - well-defined JSON with clear guidance on recurring theme identification. The tiered output expectations (3-7/5-12/8-15 based on dataset size) and quality thresholds show solid product thinking.
echo/server/dembrane/tasks.py (1)
26-26: Import placement is 100x now.Clean alphabetical grouping with the other local imports. Much better diff-grepping experience.
echo/server/dembrane/prompts.py (3)
17-24: Clean imports and config integration.Adding json import and JSON_TEMPLATES_DIR config is 100x - proper separation of template types with dedicated directories.
28-31: Dual environment architecture is 100x.Smart separation of concerns with dedicated Jinja2 environments for prompts vs JSON templates. Clean naming convention (prompt_env/json_env) makes the distinction crystal clear.
38-40: Template discovery pattern consistency.Using the same os.scandir pattern for JSON templates as the existing prompt templates - excellent consistency in the codebase.
| JSON_TEMPLATES_DIR = os.path.join(BASE_DIR, "json_templates") | ||
| logger.debug(f"JSON_TEMPLATES_DIR: {JSON_TEMPLATES_DIR}") | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
Solid drop-in, but double-check directory existence at boot
JSON_TEMPLATES_DIR is wired exactly like PROMPT_TEMPLATES_DIR—nice symmetry.
Tiny win: proactively os.makedirs(JSON_TEMPLATES_DIR, exist_ok=True) (or Path(...).mkdir) during startup so container images don’t bomb when the folder is missing.
+# Ensure the directory exists to avoid FileNotFoundError in CI / fresh containers
+os.makedirs(JSON_TEMPLATES_DIR, exist_ok=True)🤖 Prompt for AI Agents
In echo/server/dembrane/config.py around lines 82 to 84, the JSON_TEMPLATES_DIR
is set but the directory existence is not ensured, which can cause runtime
errors if the directory is missing. Add a call to
os.makedirs(JSON_TEMPLATES_DIR, exist_ok=True) right after defining
JSON_TEMPLATES_DIR to create the directory if it does not exist, preventing
errors during container startup.
| { | ||
| "user_query": "Geben Sie einen Überblick über die Hauptthemen und wiederkehrenden Themen", | ||
| "user_query_context": "Identifizieren Sie wiederkehrende Themen, Themen und Argumente, die konsistent in den Gesprächen auftreten. Analysieren Sie deren Häufigkeit, Intensität und Konsistenz. Erwartete Ausgabe: 3-7 Aspekte für kleine Datensätze, 5-12 für mittlere Datensätze, 8-15 für große Datensätze. Verarbeitungsrichtlinien: Konzentrieren Sie sich auf eindeutige Muster, die in mehreren Gesprächen auftreten. Qualitätsschwelle: Jeder Aspekt muss ein einzigartiges, konsistent auftretendes Thema mit klaren Belegen für Wiederholung darstellen." | ||
| } No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
Nit: trim trailing space after closing brace
Tiny whitespace quirk—there’s a " } " with a trailing space. Won’t break JSON, but keeping templates surgically clean avoids diff noise later.
-}
+}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| { | |
| "user_query": "Geben Sie einen Überblick über die Hauptthemen und wiederkehrenden Themen", | |
| "user_query_context": "Identifizieren Sie wiederkehrende Themen, Themen und Argumente, die konsistent in den Gesprächen auftreten. Analysieren Sie deren Häufigkeit, Intensität und Konsistenz. Erwartete Ausgabe: 3-7 Aspekte für kleine Datensätze, 5-12 für mittlere Datensätze, 8-15 für große Datensätze. Verarbeitungsrichtlinien: Konzentrieren Sie sich auf eindeutige Muster, die in mehreren Gesprächen auftreten. Qualitätsschwelle: Jeder Aspekt muss ein einzigartiges, konsistent auftretendes Thema mit klaren Belegen für Wiederholung darstellen." | |
| } | |
| { | |
| "user_query": "Geben Sie einen Überblick über die Hauptthemen und wiederkehrenden Themen", | |
| "user_query_context": "Identifizieren Sie wiederkehrende Themen, Themen und Argumente, die konsistent in den Gesprächen auftreten. Analysieren Sie deren Häufigkeit, Intensität und Konsistenz. Erwartete Ausgabe: 3-7 Aspekte für kleine Datensätze, 5-12 für mittlere Datensätze, 8-15 für große Datensätze. Verarbeitungsrichtlinien: Konzentrieren Sie sich auf eindeutige Muster, die in mehreren Gesprächen auftreten. Qualitätsschwelle: Jeder Aspekt muss ein einzigartiges, konsistent auftretendes Thema mit klaren Belegen für Wiederholung darstellen." | |
| } |
🤖 Prompt for AI Agents
In echo/server/json_templates/default_view_recurring_themes.de.jinja at lines 1
to 4, remove the trailing space after the closing brace in the JSON object to
keep the template clean and avoid unnecessary diff noise.
| { | ||
| "user_query": "Proporcione una visión general de los temas principales y temas recurrentes", | ||
| "user_query_context": "Identifique temas recurrentes, tópicos y argumentos que aparecen consistentemente a través de las conversaciones. Analice su frecuencia, intensidad y consistencia. Salida esperada: 3-7 aspectos para conjuntos de datos pequeños, 5-12 para conjuntos de datos medianos, 8-15 para conjuntos de datos grandes. Guía de procesamiento: Enfóquese en patrones distintos que emergen a través de múltiples conversaciones. Umbral de calidad: Cada aspecto debe representar un tema único y consistentemente presente con evidencia clara de recurrencia." | ||
| } No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
Final brace whitespace
Ditto—remove the extra space for a squeaky-clean tree.
-}
+}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| { | |
| "user_query": "Proporcione una visión general de los temas principales y temas recurrentes", | |
| "user_query_context": "Identifique temas recurrentes, tópicos y argumentos que aparecen consistentemente a través de las conversaciones. Analice su frecuencia, intensidad y consistencia. Salida esperada: 3-7 aspectos para conjuntos de datos pequeños, 5-12 para conjuntos de datos medianos, 8-15 para conjuntos de datos grandes. Guía de procesamiento: Enfóquese en patrones distintos que emergen a través de múltiples conversaciones. Umbral de calidad: Cada aspecto debe representar un tema único y consistentemente presente con evidencia clara de recurrencia." | |
| } | |
| { | |
| "user_query": "Proporcione una visión general de los temas principales y temas recurrentes", | |
| "user_query_context": "Identifique temas recurrentes, tópicos y argumentos que aparecen consistentemente a través de las conversaciones. Analice su frecuencia, intensidad y consistencia. Salida esperada: 3-7 aspectos para conjuntos de datos pequeños, 5-12 para conjuntos de datos medianos, 8-15 para conjuntos de datos grandes. Guía de procesamiento: Enfóquese en patrones distintos que emergen a través de múltiples conversaciones. Umbral de calidad: Cada aspecto debe representar un tema único y consistentemente presente con evidencia clara de recurrencia." | |
| } |
🤖 Prompt for AI Agents
In echo/server/json_templates/default_view_recurring_themes.es.jinja at lines 1
to 4, remove the extra space after the closing brace of the JSON object to
ensure there is no trailing whitespace, keeping the file clean and consistent.
| { | ||
| "user_query": "Fournissez un aperçu des sujets principaux et des thèmes récurrents", | ||
| "user_query_context": "Identifiez les thèmes récurrents, sujets et arguments qui apparaissent de manière cohérente à travers les conversations. Analysez leur fréquence, intensité et cohérence. Sortie attendue : 3-7 aspects pour les petits ensembles de données, 5-12 pour les ensembles moyens, 8-15 pour les grands ensembles. Guidance de traitement : Concentrez-vous sur les modèles distincts qui émergent à travers plusieurs conversations. Seuil de qualité : Chaque aspect doit représenter un thème unique et cohérent avec des preuves claires de récurrence." | ||
| } No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
Whitespace déjà-vu
Same trailing space issue as the German template—zap it for consistency.
-}
+}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| { | |
| "user_query": "Fournissez un aperçu des sujets principaux et des thèmes récurrents", | |
| "user_query_context": "Identifiez les thèmes récurrents, sujets et arguments qui apparaissent de manière cohérente à travers les conversations. Analysez leur fréquence, intensité et cohérence. Sortie attendue : 3-7 aspects pour les petits ensembles de données, 5-12 pour les ensembles moyens, 8-15 pour les grands ensembles. Guidance de traitement : Concentrez-vous sur les modèles distincts qui émergent à travers plusieurs conversations. Seuil de qualité : Chaque aspect doit représenter un thème unique et cohérent avec des preuves claires de récurrence." | |
| } | |
| { | |
| "user_query": "Fournissez un aperçu des sujets principaux et des thèmes récurrents", | |
| "user_query_context": "Identifiez les thèmes récurrents, sujets et arguments qui apparaissent de manière cohérente à travers les conversations. Analysez leur fréquence, intensité et cohérence. Sortie attendue : 3-7 aspects pour les petits ensembles de données, 5-12 pour les ensembles moyens, 8-15 pour les grands ensembles. Guidance de traitement : Concentrez-vous sur les modèles distincts qui émergent à travers plusieurs conversations. Seuil de qualité : Chaque aspect doit représenter un thème unique et cohérent avec des preuves claires de récurrence." | |
| } |
🤖 Prompt for AI Agents
In echo/server/json_templates/default_view_recurring_themes.fr.jinja at lines 1
to 4, remove the trailing space at the end of the JSON content to maintain
consistency with other language templates and avoid whitespace issues.
| { | ||
| "user_query": "Geef een overzicht van de hoofdonderwerpen en terugkerende thema's", | ||
| "user_query_context": "Identificeer terugkerende thema's, onderwerpen en argumenten die consistent voorkomen in gesprekken. Analyseer hun frequentie, intensiteit en consistentie. Verwachte uitvoer: 3-7 aspecten voor kleine datasets, 5-12 voor middelgrote datasets, 8-15 voor grote datasets. Verwerkingsrichtlijnen: Focus op onderscheidende patronen die opkomen in meerdere gesprekken. Kwaliteitsdrempel: Elk aspect moet een uniek, consistent voorkomend thema vertegenwoordigen met duidelijk bewijs van herhaling." | ||
| } No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
Trailing space tidy-up
Nip the space after the closing brace.
-}
+}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| { | |
| "user_query": "Geef een overzicht van de hoofdonderwerpen en terugkerende thema's", | |
| "user_query_context": "Identificeer terugkerende thema's, onderwerpen en argumenten die consistent voorkomen in gesprekken. Analyseer hun frequentie, intensiteit en consistentie. Verwachte uitvoer: 3-7 aspecten voor kleine datasets, 5-12 voor middelgrote datasets, 8-15 voor grote datasets. Verwerkingsrichtlijnen: Focus op onderscheidende patronen die opkomen in meerdere gesprekken. Kwaliteitsdrempel: Elk aspect moet een uniek, consistent voorkomend thema vertegenwoordigen met duidelijk bewijs van herhaling." | |
| } | |
| { | |
| "user_query": "Geef een overzicht van de hoofdonderwerpen en terugkerende thema's", | |
| "user_query_context": "Identificeer terugkerende thema's, onderwerpen en argumenten die consistent voorkomen in gesprekken. Analyseer hun frequentie, intensiteit en consistentie. Verwachte uitvoer: 3-7 aspecten voor kleine datasets, 5-12 voor middelgrote datasets, 8-15 voor grote datasets. Verwerkingsrichtlijnen: Focus op onderscheidende patronen die opkomen in meerdere gesprekken. Kwaliteitsdrempel: Elk aspect moet een uniek, consistent voorkomend thema vertegenwoordigen met duidelijk bewijs van herhaling." | |
| } |
🤖 Prompt for AI Agents
In echo/server/json_templates/default_view_recurring_themes.nl.jinja at lines 1
to 4, remove the trailing space after the closing brace to tidy up the JSON
template and ensure there is no unnecessary whitespace at the end of the file.
…#238) Add render_message function and new prompt templates for recurring themes - Introduced a new function render_message in prompts.py to render message templates and validate keys. - Added default prompt templates for recurring themes in multiple languages (English, Dutch, German, Spanish, French) to enhance conversation analysis capabilities. - Updated tasks.py to utilize the new render_message function for generating messages based on the recurring themes template. --- * Add render_message function and new prompt templates for recurring themes - Introduced a new function `render_message` in prompts.py to render message templates and validate keys. - Added prompt templates for recurring themes in multiple languages (English, Dutch, German, Spanish, French) to enhance conversation analysis capabilities. - Updated tasks.py to utilize the new `render_message` function for generating messages based on the recurring themes template. * - Error handelling improved - Typo corrected * Add JSON template support and refactor rendering functions - Introduced a new directory for JSON templates and updated the configuration to include `JSON_TEMPLATES_DIR`. - Refactored the `render_message` function to `render_json`, enabling the rendering of JSON templates for recurring themes. - Updated relevant imports and function calls in `tasks.py` to utilize the new `render_json` function. * add logging for JSON templates --------- Co-authored-by: Roy <> Co-authored-by: Sameer Pashikanti <sameer@dembrane.com>
Add render_message function and new prompt templates for recurring themes
render_messagein prompts.py to render message templates and validate keys.render_messagefunction for generating messages based on the recurring themes template.Summary by CodeRabbit