Commit Graph
10 Commits
Author SHA1 Message Date
evandrodevbr 60b0101717 [autoresearch] baseline: system prompt quality tests (5/5 passing) 2026-04-11 05:27:36 -03:00
Evandro Fonseca Junior 8afd2cbfed feat(backend): implement multi-agent thinking framework skeleton
Added orchestrator.rs with parallel dispatching of 4 personas (Security, Architect, Critic, UX) using tokio Semaphores to prevent OOM. Included stream multiplexing and synthesis phase, though still in draft/skeleton form.
2026-04-04 02:33:07 -03:00
Evandro Fonseca Junior 8f32b677da fix: map local model aliases to Qwen template to stop prompt echo loops
When using local aliases like Cooper, Iron, or Steel (which are Qwen-based architectures), the select_chat_template failed to identify them because the alias names didn't contain 'qwen'. This caused the inference server to fall back to the Generic template (User: ... \nAssistant:), which caused Qwen models to hallucinate completion blocks starting with <|im_end|>\n<|im_start|>assistant to 'correct' the missing tags, resulting in the model repeating the user's prompt at the beginning of its response.
2026-04-04 00:19:34 -03:00
Evandro Fonseca Junior 36b80bc0a8 fix: address all differential review feedback
1. Reduced repeat_penalty to 1.15 to avoid degrading normal generation.
2. TPS degradation monitor now actively aborts the stream instead of just warning.
3. Removed broad transcript leakage regex from the frontend, relying fully on backend stop sequences to prevent false positives.
4. Fixed race condition in useRuntimeManager by moving model scanning into a reactive useEffect instead of an imperative ref call.
5. Enforced JSON format natively via response_format for ForgeAgent inference requests.
2026-04-03 23:16:41 -03:00
Evandro Fonseca Junior 88f4319c3f fix: stop transcript leakage and repetition loops in Generic chat template
Backend (inference-server/compat.rs):
- PreparedPrompt now carries extra_stop_sequences injected by template
- Generic template injects User:/System:/Assistant:/Human: stop sequences
  to prevent the model from continuing the transcript after its reply
- Increased repeat_penalty 1.15→1.3 and repeat_last_n 256→512 to
  break repetition loops more aggressively

Backend (inference-server/routes.rs):
- Merge template extra_stop_sequences into sampler before inference

Frontend (chat.ts):
- Added 'System:' and 'Human:' to CHAT_TRANSCRIPT_STOP_SEQUENCES
- Extended TRANSCRIPT_LEAKAGE_PATTERN to include 'Human:'

Frontend (ChatView.tsx):
- buildApiMessages now strips leaked transcript from assistant messages
  before sending history back to the model
- Reduced history window to 20 messages to limit context pollution
2026-04-02 20:42:04 -03:00
Evandro Fonseca Junior 77c57c3d45 Add runtime state validation before ForgeAgent HTTP call
- Check process_running and ready state before making inference request
- Emit descriptive error messages for each failure scenario
- Handle local vs remote connection modes appropriately
- Validation score: 100 (was 0)

Result: {"status":"keep","validation_score":100,"response_time_ms":500}
2026-04-02 14:37:01 -03:00
Evandro Fonseca Junior 01b629cb4a feat: add SettingsPage with HuggingFace model search and fix flexbox layout
- Add SettingsPage component with macOS/Linear-style settings UI (sp-* classes)
- Fix HuggingFace results list squeeze: sp-card-row--full now has align-items: stretch
  overriding the inherited flex-start, ensuring children fill 100% horizontal width
- Fix sp-hf-file row layout: width 100%, grid columns for name/quant/size/download
- Fix sp-hf-name truncation: explicit overflow/ellipsis/white-space in CSS
- Add white-space: nowrap to sp-hf-size and sp-hf-quant-badge to protect secondary columns
- Add runtime-deps crate, Tailwind/PostCSS config, runtime-defaults, MessageBubble test
- Update Cargo workspace, inference-server, tauri runtime types and process handling
2026-03-30 23:35:08 -03:00
Evandro Fonseca Junior 44875aa03e fix(quick-1): prevent 'internal error' from polluting DB and chat history
- routes.rs: StreamItem::Error now emits content:None so fullContent stays
  empty and the frontend does not accumulate 'internal error' as a response
- ChatView.tsx: buildApiMessages filters out empty/error messages from the
  history sent to the backend, preventing corrupted context on retries
- ChatView.tsx: assistant INSERT is guarded — skipped when fullContent is
  empty, so a failed stream leaves no empty assistant row in the DB
2026-03-30 17:29:57 -03:00
Evandro Fonseca Junior d9198795bf fix(quick-1): bail on NULL KV cache and improve prefill error diagnostics
- engine.rs: new_session() now returns Err when llama_get_memory returns NULL
  instead of silently continuing, preventing decode corruption on 2nd request
- session.rs: decode_prefill error includes token count for easier diagnosis
2026-03-30 17:28:39 -03:00
Evandro Fonseca Junior a392b9dc60 Initial ForgeLM import 2026-03-29 19:10:57 -03:00