Back to blog

OKR Coach System: Intelligent Scoring and Training Platform

An AI agent-based OKR scoring and training system supporting file upload, automatic cleaning, intelligent scoring, and result export.

#AI#Full-Stack#FastAPI#Vue#DeepSeek

Project Overview

This system is an AI agent-based OKR scoring and training platform, supporting OKR file upload, automatic cleaning, intelligent scoring, and result export. It helps enterprises standardize OKR assessment and provides actionable feedback.

Technical Architecture

LayerTechnology
BackendFastAPI, Uvicorn, SQLite
FrontendVue 3, Vite
ScoringLLM (DeepSeek via DashScope) / Coze API
Document Processingpython-docx, openpyxl

Core Features

File Processing

  • Supported formats: docx / xlsx / xls
  • Auto cleaning: Parse O (Objective) and K (Key Result) structure, unify format
  • Batch processing: Use ThreadPoolExecutor for concurrent analysis

Intelligent Scoring

System uses 130-point scale, with difficulty multiplier up to 10x:

PartWeightSystemMax
O (Objective)30%Additive30 pts
K (Key Actions)40%Deductive40 pts
R1 (Result)30%Additive30 pts
R2 (Review)30%Additive30 pts

Formula: min(O,30) + min(R1,30) + min(R2,30) + max(0, 40-min(K,40))

Position Customization

Supports different scoring criteria for different positions, with customizable weights and scoring rules through configuration files.

Project Structure

app/
  main.py                 # Streamlit entry (deprecated)
  services/
    okr_ingestion.py      # File reading and record normalization
    okr_cleaning.py       # O/K parsing and cleaning
    okr_scoring.py        # Scoring backend selection
    okr_export.py         # Excel/document export
api/
  main.py                 # FastAPI backend (streaming interface)
frontend/
  src/                    # Vue + Vite frontend

API Design

Streaming Scoring Endpoint

@app.post("/api/analyze/stream")
async def analyze_stream(file: UploadFile):
    async def generate():
        async for progress in okr_analyzer.analyze_stream(file):
            yield f"data: {json.dumps(progress)}\n\n"
    return StreamingResponse(generate(), media_type="text/event-stream")

Export Endpoint

@app.post("/api/export")
async def export_results(results: List[AnalysisResult], format: str):
    # Supports Excel, CSV, DOCX format export
    return export_file(results, format)

Usage

# Install dependencies
pip install -r requirements.txt
 
# Start backend
cd api && uvicorn main:app --reload
 
# Start frontend
cd frontend && npm run dev

Current Status

Production ready, continuously iterating and optimizing.


Related Links


Last updated: 2026-04-01