MCP ExplorerExplorer

Prompt Code

@shadowcz007on a month ago
1 MIT
FreeCommunity
AI Systems
#agent#llm#mcp#prompt
Prompt-Code is an LLM-based solution for converting natural language into structured semantic data.

Overview

What is Prompt Code

Prompt-Code is a semantic processing solution based on LLM (Large Language Model) that converts natural language into structured semantic label data.

Use cases

Use cases for Prompt-Code include automating data tagging, enhancing search functionalities, building knowledge graphs, and facilitating data-driven decision-making.

How to use

To use Prompt-Code, first create and activate a Python virtual environment, install the required dependencies, configure the OpenAI API key in the .env file, and then run the main program using ‘python main.py’.

Key features

Key features include semantic label conversion using LLM, support for field and value extraction, construction of contextual relationship graphs, and SQLite data persistence.

Where to use

Prompt-Code can be used in various fields such as natural language processing, data analysis, and any application requiring structured data extraction from unstructured text.

Content

LLM系统提示语义处理方案

基于LLM的系统提示语义处理解决方案,用于将自然语言转换为结构化的语义标签数据。

功能特点

  • 使用LLM进行语义标签转换
  • 支持字段和值提取
  • 构建上下文关系图结构
  • SQLite数据持久化存储

安装

  1. 创建并激活Python虚拟环境:

Windows:

# 创建虚拟环境
python -m venv .venv

# 激活虚拟环境
.\.venv\Scripts\activate

# 确认Python解释器位置
where python

Linux/Mac:

# 创建虚拟环境
python3 -m venv .venv

# 激活虚拟环境
source .venv/bin/activate

# 确认Python解释器位置
which python
  1. 安装依赖:
pip install -r requirements.txt

使用方法

  1. 确保虚拟环境已激活,终端提示符前应显示(venv)

  2. 配置OpenAI API密钥:
    修改.env文件

  3. 运行主程序:

python main.py

项目结构

project_root/
├── src/              # 源代码
├── tests/            # 测试用例
├── config/           # 配置文件
├── data/             # 数据文件
├── .venv/             # Python虚拟环境
└── main.py          # 主入口

开发指南

  1. 激活虚拟环境后安装开发依赖:
pip install -r requirements.txt
  1. 运行测试:
pytest tests/

许可证

MIT License

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers