- Updated prompt to specify expected JSON structure for facts and entities
- Added 'text' field support in fact parsing (alongside 'full_text')
- Listed explicit type values for facts and entities
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Testing revealed that max_tokens=2000 parameter causes Gemini to block
requests with safety filters, even for safe content.
Removed max_tokens from generate_text() call - Gemini will use default.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Testing revealed that Gemini 2.5 safety filters block texts longer than
~2000 chars. Applied two fixes:
1. Truncate chunk text to 2000 chars in _extract_with_ai() as safety net
2. Reduce MAX_CHUNK_SIZE from 1000 to 500 tokens (~2000 chars)
This ensures all AI extraction requests stay within Gemini's safe limits.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The complex JSON schema with pipe characters was triggering Gemini 2.5's
safety filters. Simplified to minimal prompt that still produces valid output.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Problem: Gemini blokował ekstrakcję z artykułów o energetyce
Rozwiązanie: Bardziej neutralne sformułowania promptów
- Podkreślono że to analiza PUBLICZNYCH artykułów prasowych
- Usunięto wrażliwe słowa kluczowe (nuclear, defense)
- Zmieniono 'extract' na 'identify'
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Problem: GeminiService.generate_text() nie obsługuje parametru system_prompt
Rozwiązanie: Połączono system_prompt z user_prompt w jeden full_prompt
Dotyczy: ekstrakcji faktów, encji i relacji z artykułów ZOPK
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>