* Fix reflect based_on population and enforce full hierarchical retrieval Problem 1: based_on field was incomplete - search_observations results were never extracted into based_on, so observations used by the agent were invisible to callers - search_mental_models and get_mental_model used non-existent fields (summary/description) instead of the actual content field, producing empty text in based_on entries - A duplicate unreachable elif block for search_mental_models was dead code (the first identical condition always matched) Problem 2: mental models could produce "I don't have information" - When a bank has mental models, the agent's tool_choice forcing only covered iteration 0 (search_mental_models). Iterations 1+ were auto, allowing the LLM to short-circuit without ever searching observations or raw facts. Combined with the LOW budget prompt encouraging speed, this meant the agent would often stop after a single tool call. - This created a self-reinforcing failure loop: if a mental model refresh produced "I don't have information" (e.g. due to the agent skipping recall), subsequent reflects would find that content and trust it, never searching deeper. Fix: extend forced tool_choice to cover the full hierarchical retrieval path before allowing auto mode: - With mental models: search_mental_models(0) → search_observations(1) → recall(2) → auto(3+) - Without mental models: search_observations(0) → recall(1) → auto(2+) This matches the retrieval strategy documented in the system prompt and ensures all three knowledge levels are always consulted. The agent still has 2-3 auto iterations (with LOW budget, max_iterations=5) for additional searches or calling done(). * Add Umami analytics tracking to docs site Add conditional Umami script injection to docusaurus.config.ts and pass UMAMI_URL/UMAMI_WEBSITE_ID env vars in the GitHub Pages deploy workflow. The tracking script only loads when both env vars are set.
48 lines
1.1 KiB
YAML
48 lines
1.1 KiB
YAML
name: Deploy Docs to GitHub Pages
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- 'hindsight-docs/**'
|
|
- '.github/workflows/deploy-docs.yml'
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
pages: write
|
|
id-token: write
|
|
|
|
concurrency:
|
|
group: pages
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: npm
|
|
cache-dependency-path: package-lock.json
|
|
- uses: astral-sh/setup-uv@v4
|
|
- run: npm ci --workspace=hindsight-docs
|
|
- run: uv run generate-llms-full
|
|
- run: npm run build --workspace=hindsight-docs
|
|
env:
|
|
UMAMI_URL: https://analytics.hindsight.vectorize.io
|
|
UMAMI_WEBSITE_ID: ${{ secrets.UMAMI_WEBSITE_ID }}
|
|
- uses: actions/upload-pages-artifact@v3
|
|
with:
|
|
path: hindsight-docs/build
|
|
deploy:
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
steps:
|
|
- uses: actions/deploy-pages@v4
|
|
id: deployment
|