2025-11-06 11:08:59 +01:00
2025-11-06 11:08:59 +01:00
2025-11-06 11:08:59 +01:00
2025-11-06 11:08:59 +01:00
2025-11-06 11:08:59 +01:00
2025-11-06 11:08:59 +01:00
2025-11-06 11:08:59 +01:00
2025-11-06 11:08:59 +01:00
2025-11-06 11:08:59 +01:00
2025-11-06 11:08:59 +01:00
2025-11-06 11:08:59 +01:00

Reason Flow - AI Engineering Reasoning System

An intelligent AI system for complex engineering reasoning with continuous learning capabilities.

Architecture

  • MODEL1: Engineering reasoning model that creates step-by-step plans
  • QUERYMODEL: Execution model that uses tools to carry out plans
  • RAG Pipeline: Document search and retrieval system
  • 6 Specialized Tools: Query expansion, extraction, reports, web search, PDF search
  • Feedback Loop: Continuous learning system

Tech Stack

  • Backend: Express.js, PostgreSQL, Sequelize
  • Frontend: React, Socket.io
  • AI Models: Kimi K2 (Groq), OpenAI
  • RAG: LangChain, Vector Database
  • Fine-tuning: SFT, DPO, Correction Memory

Setup Instructions

  1. Install dependencies:
npm run install-all
  1. Set up environment variables:
cp env.example .env
# Edit .env with your API keys and database credentials
  1. Set up database:
# Create PostgreSQL database
createdb reason_flow
  1. Start development servers:
npm run dev-full

Project Structure

reason_flow/
├── server/                 # Express.js backend
│   ├── controllers/       # Route controllers
│   ├── models/           # Database models
│   ├── routes/           # API routes
│   ├── services/         # Business logic
│   ├── middleware/       # Custom middleware
│   └── utils/            # Utility functions
├── client/               # React frontend
│   ├── src/
│   │   ├── components/   # React components
│   │   ├── pages/        # Page components
│   │   ├── services/     # API services
│   │   └── utils/        # Utility functions
├── data/                 # Training data and documents
├── tests/                # Test files
└── uploads/              # File uploads

Features

  • Intelligent Planning: AI generates step-by-step engineering plans
  • Tool Execution: Automated execution using specialized tools
  • Document Search: RAG-powered document retrieval
  • Continuous Learning: Feedback loop for model improvement
  • Real-time Chat: WebSocket-based communication
  • File Upload: Document processing and indexing

API Endpoints

  • /api/health - Health check
  • /api/auth/* - Authentication
  • /api/chat/* - Chat functionality
  • /api/models/* - Model management
  • /api/documents/* - Document management
  • /api/feedback/* - Feedback collection
  • /api/tools/* - Tool execution

Development

Run tests:

npm test

Build for production:

npm run build

License

MIT

S
Description
No description provided
Readme 122 KiB
Languages
JavaScript 83.9%
CSS 15.9%
HTML 0.2%