How can you deliver fast, personalized feedback using AI today?
Why OCR and LLM are the perfect pair for modern education
Build an automated evaluation workflow step by step
Below is a minimal, reusable process that combines these three technologies.
1. Extract text with Unlimited OCR 2
```python import requests def ocr_document(file_path): url = "https://api.baidu.com/v1/unlimited-ocr" headers = {"Authorization": "Bearer YOUR_BAIDU_TOKEN"} files = {"document": open(file_path, "rb")} resp = requests.post(url, headers=headers, files=files) return resp.json()["text"] ```
2. Create a vector index with LEANN
```python from leann import LeannIndex # Extract embeddings using LFM3-1.7B (text-only) embeddings = [LFM3.embed(text_chunk) for text_chunk in chunks] index = LeannIndex(dim=len(embeddings[0])) index.add(embeddings) ```
3. Retrieve relevant chunks
```python def retrieve_context(student_text, index, top_k=3): query_vec = LFM3.embed(student_text) results = index.search(query_vec, k=top_k) return [idx.chunk for idx in results] ```
4. Generate feedback with LFM3
```python def generate_feedback(student_text, context_chunks): prompt = f""" Analyze the following school essay and provide structured feedback. **Reference context:** {context_chunks} **Essay:** {student_text} Evaluate: 1. Originality and citation (0-10) 2. Structure and organization (0-10) 3. Vocabulary and accuracy (0-10) 4. Spelling and punctuation (0-10) Provide concrete suggestions for each area, in a constructive tone. """ return LFM3.generate(prompt) ```
Practical example: Evaluating an Italian essay
Imagine you need to evaluate a 5-page essay uploaded to a course management system. This workflow generates feedback in about 12 seconds.
Prompt engineering for constructive feedback
- Use positive language:“Your topic is well supported… consider adding…”
- Be specific:Provide concrete examples instead of generic “improvements.”
- Adjust detail level:High school students need simpler guidance than college students.
- Include references to grading standards:Mention the criteria used (originality, structure, vocabulary, spelling).
Example of a few-shot prompt:
```text Example feedback: Originality (8/10): The essay presents original ideas, but lacks citations for one topic. Structure (9/10): The organization is clear with a strong thesis and effective conclusion. Vocabulary (7/10): The language is appropriate, with some technical terms not entirely precise. Spelling (10/10): No errors. Suggestion: Add a citation for the main argument. Suggestion: Refine the choice of technical terms. ```
Benefits and ethical considerations
- Speed:Evaluate dozens of assignments in minutes.
- Scalability:LEANN’s compact indexes support thousands of students simultaneously.
- Personalization:Contextual retrieval ensures every student receives tailored feedback.
- Transparency:Always document the exact prompt and AI model used to avoid evaluation opacity.
- Privacy:Store raw student data locally and remove personal data after feedback extraction.
- Bias prevention:Regularly audit LLM training data for evaluation disparities.
Conclusion: From raw text to intelligent feedback
Innovations like Unlimited OCR 2, LEANN, and LFM3 have made it possible to transform a PDF assignment into personalized, constructive feedback in seconds. By integrating these tools into an existing LMS, teachers can spend more time on teaching and less on mechanical grading, while maintaining a high level of individual care for each student.
Conclusion:Use these steps as a foundation, adapting tools, policies, and controls to your organization’s specific needs.
**IMPORTANT:** We are in 2026. All temporal references must be current. Do not mention past years such as 2024, 2023, etc. The content must be fresh and relevant to the present. **CURRENT CONTEXT (October 2026):** Here are some recent trends and news to inspire you: - Liquid AI released LFM3: 6 open-weight 2B-class multimodal models for text, vision, audio, omni, and decisions. LFM3-1.7B uses a tri-hybrid backbone, a 256K context length. [2026-10-27] - Baidu open-sourced Unlimited OCR 2 for parsing hundred-page documents. This MIT-licensed 3B OCR model analyzes entire documents in one request. Its SR-SWA attention maintains high precision. [2026-10-27] - UC Berkeley’s LEANN vector index shrinks a 60M-chunk RAG index from 201 GB to 6 GB. It stores a pruned graph and recomputes embeddings at query time, matching HNSW accuracy at 90% recall using 4 GB. [2026-10-27] Use this current information to create an original and relevant 2026 prompt.