deepseek_v4_rolepaly_instruct  by victorchen96

Control LLM role-playing with specialized thinking modes

Created 4 days ago

New!

1,289 stars

Top 30.5% on SourcePulse

GitHubView on GitHub
Project Summary

DeepSeek V4 Roleplay Instruct Control

This repository provides a method for controlling the internal reasoning and role-playing behavior of DeepSeek V4 models. It targets developers and advanced users interacting with DeepSeek V4 via its API or specific web/app interfaces, enabling more nuanced and consistent character immersion or analytical outputs by manipulating the model's thought process.

How It Works

The core mechanism involves appending specific control instructions to the first user message in a conversation. Two primary modes are supported: "Role Immersion," which prompts the model to generate first-person inner monologues within <think> tags (e.g., (心想: ...)), and "Pure Analysis," which enforces objective, logical reasoning without character-based internal dialogue. These instructions leverage the model's context window, ensuring the chosen thinking style persists throughout the interaction without repeated prompting.

Quick Start & Requirements

  • Usage: Append specific instruction text (provided in the README) to the end of the first user message.
  • Prerequisites: Access to DeepSeek V4 models (Official APP/Web Expert Mode, deepseek-v4-flash, deepseek-v4-pro API).
  • Setup: No installation required; prompt engineering is the primary method.
  • Documentation: The project's README serves as the primary guide. API usage examples are provided in Python.

Highlighted Details

  • Fine-grained control over model's internal thought process via prompt engineering.
  • Distinct modes: "Role Immersion" for character depth and "Pure Analysis" for objective reasoning.
  • API integration example demonstrates programmatic control over the modes.
  • Alternative, less reliable "lottery" methods for modifying thinking chains are mentioned.

Maintenance & Community

No specific details regarding maintainers, community channels (e.g., Discord, Slack), or project roadmap are present in the provided documentation. This appears to be a guide rather than a continuously developed software project.

Licensing & Compatibility

  • License: No license information is specified in the README.
  • Compatibility: Primarily designed for DeepSeek V4 models. The web interface's "Quick Mode" is explicitly noted as unsupported.

Limitations & Caveats

The effectiveness of the control instructions is probabilistic and not guaranteed to trigger 100% of the time; multiple attempts may be necessary. The system is incompatible with the DeepSeek web interface's "Quick Mode." Additionally, alternative methods for altering thinking chains are described as unreliable "lottery" mechanisms. The absence of explicit licensing information presents a significant adoption blocker for many use cases.

Health Check
Last Commit

2 days ago

Responsiveness

Inactive

Pull Requests (30d)
2
Issues (30d)
7
Star History
1,320 stars in the last 4 days

Explore Similar Projects

Starred by Eric Zhu Eric Zhu(Coauthor of AutoGen; Research Scientist at Microsoft Research) and Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems").

PromptWizard by microsoft

0.1%
4k
Agent-driven framework for task-aware prompt optimization
Created 1 year ago
Updated 6 months ago
Starred by Tony Lee Tony Lee(Author of HELM; Research Engineer at Meta), Vincent Weisser Vincent Weisser(Cofounder of Prime Intellect), and
16 more.

Qwen3 by QwenLM

0.1%
27k
Large language model series by Qwen team, Alibaba Cloud
Created 2 years ago
Updated 3 months ago
Feedback? Help us improve.