Spaces:
Sleeping
Sleeping
Commit History
-
feat: follow-up question improvements and context tracking
- Add aggregate query tracking (_last_aggregate) in SessionEntityStore - Add _resolve_best_entity for multi-entity follow-up resolution - Add last_query_mode property for conversation topic tracking - Wire build_context_preamble into _execute_documents and _execute_conversational - Add skip_rewrite parameter to RetrievalEngine.retrieve() - Pass skip_rewrite=True in _execute_hybrid and _execute_documents - Track is_database flag in chat history entries - Preserve database-tagged messages during conversation summarization - Record entity_store.last_query_mode after query execution - Track aggregate results via entity_store.update_aggregate in _execute_database92925b6 -
refactor: remove dead code and unused exports
- Remove IntentClassifier class from intent_classifier.py (keep IntentType, ClassificationResult) - Remove error_handler imports from integration/__init__.py - Remove DATABASE_SCHEMA constant from prompts/registry.py - Remove DATABASE_SCHEMA export from prompts/__init__.py - Remove _make_simple_format from view_manager.py (already in prior commit)6b076f7 -
fix: security hardening and correctness bug fixes
- Parameterize SQL in check_dealer_access and build_query to prevent injection - Rewrite render_database_tab to use DatabaseAdapter instead of raw sqlite3 - Add aggregate guard in match_all_views for identifier_type=None views - Fix set_active_identifier to merge identifiers instead of replacing - Add CONVERSATIONAL QueryMode, fix _execute_conversational mode reporting - Add reset_entity_store/reset_context_manager to reset_application - Gate aggregate check behind 'not id_val' in query_and_format - Cache _ALL_DB_KEYWORDS and _MONTH_NUMBER_TO_TURKISH at module level - Add single-month Turkish name query support - Lazy Groq client initialization in LLMGenerator - Import has_view_specific_keywords in intent_routerc9983e1 -
insurance view methods in view manager
25abab6
-
karar gerekçesi deleted
b49d5d9 -
added insurance keywords and views
a74081e -
fixed insurance no syntax in app
29d98db -
Added necessary views, keywords and registry
370ea08 -
added a new intent for crm referral
d8bc2e2 -
Added env variable for current dealer id
5e91de7 -
Added PoC scope
f4900d5
-
Update src/app.py
Verified signatureremoved logs.ec85947 -
Update src/app.py
Verified signatureupdated app.py for dbbd48f40 -
Update src/app.py
Verified signatureupdated app.py3bb1aae
-
Documentation improved
Kagan Tekd673191 -
new tabs added
NIHAEFEfd82e67
-
db config fix
Kagan Tek817f0d3 -
Cleaned up project, put prompts in registry.py, deleted redundant comments
0ff62f0 -
Context fix
ba5bccb
-
Bi directional lead id query, hybird mode context improvement
1bc651d -
Lead ID case added and context fixed
5ea2143
-
fix
9057659 -
Merge branch 'refactor/project-simplification'
a77765e -
merge 2
Kagan Tek965ac51
-
merge
Kagan Tek79d4fd5 -
Changed prompt
3a3f7ff -
Clean config and fix stale imports across codebase
Remove ~50 dead config keys from config.py, rename FALLBACK_DATABASE_SCHEMA to DATABASE_SCHEMA. Remove init_agent_engine and agent wiring from app.py. Simplify database_init.py to connect+list. Remove SQLValidator from sql_executor.py. Replace deleted config imports in logger.py and token_optimizer.py with local constants. Update affected tests.d758036 -
Simplify integration layer (query_handler, intent_router, context_manager)
Collapse query_handler from 1212 to 342 lines, wire to view_manager. Replace LLM-based intent_router with pure regex/keyword routing. Simplify context_manager to session-scoped CreditFileId tracking and history trimming. Replace config import in conversation_state with local constant. Remove ConversationStateManager from integration exports. Rewrite all corresponding tests for the new architecture.2f700d6 -
Add view_manager for deterministic keyword-based view routing
New module with VIEW_REGISTRY mapping views to Turkish keywords. Provides extract_credit_file_id(), match_view(), build_query(), execute_view_query(), format_response(), query_and_format(). Replaces the entire NL2SQL pipeline with direct SQL execution. Includes 30+ tests covering all routing and edge cases.29f9f77 -
Remove dead database modules (NL2SQL pipeline, schema management, validators)
Delete nl2sql_generator.py, sql_validator.py, retry_orchestrator.py, query_planner.py, schema_context_provider.py, table_scorer.py, semantic_validator.py, result_formatter.py, pattern_cache.py, schema_embedder.py, schema_loader.py, schema_manager.py and their corresponding test files. Update database __init__.py to only import kept modules.a55d1f2 -
Remove dead agent modules (agent_engine, planner, result_synthesizer, tool_registry)
Delete agent_engine.py, planner.py, result_synthesizer.py, tool_registry.py and their corresponding test files. Update agent __init__.py to only export IntentType and ClassificationResult from intent_classifier.fd598a4 -
Added context filtering for non auto as well, fixed hybrid mode failures
673f84d
-
Credit ID tracking
Kagan Tek2384d9e -
Turkish character conversion
Kagan Tekd32c4ea -
fix intent router
Kagan Tek5afb879 -
fixed fallback db schema, cleaned prompts, rewrote formatting to be view aware,
Kagan Tek7642c53
-
new doc
Kagan Tekfbfd8d7 -
db tab added.
NIHAEFEb1e1910 -
Decision Result added.
NIHAEFEda7595b -
downpayment view updated.
NIHAEFE46679ec -
db process updated.
NIHAEFE4a566fd
-
Propagate model_id to NL2SQL generator LLM calls
Add model_id parameter to NL2SQLGenerator.generate, generate_with_retry, and _call_llm methods. Use model_id or fall back to self._model for Groq API calls. Pass model_id from DatabaseQueryTool.execute through to generator.generate so model switches take effect on SQL generation.421258c -
Fix model dropdown selection and route all modes through QueryHandler
Compute selectbox index from session state instead of hardcoded index=0 so model switches are preserved across reruns. Route all query modes including DOCUMENTS through QueryHandler.execute instead of bypassing it with direct retrieval engine calls.493b9f3 -
Rewrite _execute_auto to use IntentRouter for single-pass routing
Replace duplicate classification logic with IntentRouter.route() call. Add _is_database_available and _get_effective_classifier helpers. Extend QueryResult with routing_metadata and model_id fields. Pass model_id through all execution paths including _execute_documents, _execute_database, _execute_hybrid, and _execute_conversational.de6c2e5 -
Thread model_id through agent layer components
Add optional model_id parameter to IntentClassifier.classify, Planner.create_plan, ResultSynthesizer.synthesize, and AgentEngine.process. Each component uses model_id or falls back to its configured default model for Groq API calls.7353fa7 -
Add IntentRouter for deterministic AUTO mode query routing
Extract routing decision logic into dedicated IntentRouter class with RoutingDecision dataclass. Implements single-pass classification with confidence threshold, database availability checks, and keyword-based fallback when no classifier is available. Uses .value string comparisons for enum identity safety across module boundaries. Includes 27 tests.8cdf6c9 -
fix: prepend full schema context to prevent column hallucination
Update query handler to always prepend FALLBACK_DATABASE_SCHEMA at the top of schema context, ensuring the LLM always has access to complete column listings regardless of semantic search results. Prevents generation of non-existent column references.4f738ae -
fix: enforce SQLite dialect and improve NL2SQL prompts
Rewrite system prompt with explicit SQLite declaration and column existence warnings. Expand few-shot examples from 10 to 16 with correct column references. Enhance error correction prompt with structured feedback. Change default dialect from postgresql to sqlite throughout the NL2SQL generator.4004c6f -
feat: wire new singletons into database lifecycle
Register SemanticValidator, TableRelevanceScorer, and SchemaContextProvider in database initialization and cleanup. Export new modules from database and integration packages. Integrate semantic validation into SQL validator pipeline.2491e3a -
feat: enhance schema loader and embedder with relationship metadata
Update schema loader to extract table descriptions and column metadata from enriched YAML schema. Enhance schema embedder to generate relationship-aware embeddings. Add relationship definitions and table descriptions to database_schema.yaml for improved semantic search accuracy.1febd8f