微信扫码
添加专属顾问
幻觉问题,即一本正经的胡说八道,看似流畅自然的表述,实则不符合事实或者是错误的。
Prompt是克服这些大语言模型挑战的一种有效手段,它就像是一把引导大语言模型的魔杖,帮助大语言模型更好地理解输入的意图和任务,以正确得生成特定类型、主题或格式的输出。Prompt的好坏直接影响到大语言模型输出的输出效果和用户体验,因此Prompt对于构建基于大语言模型的应用/系统也是至关重要。
那么,什么是Prompt呢?Prompt(提示)是指输入给大语言模型的文本片段(可以是一句简单的问题,一段较长的文本,或者一组指令,这取决于用户的具体需求),用于指导模型生成符合特定要求的文本。大语言模型的工作原理是根据输入的文本,来预测下一个词出现的概率,逐字生成出下文。它并不会像人类那样完全理解输入的Prompt,而是根据统计规律和语言模型来生成输出,例如,如果Prompt是“今天天气很”,模型可能会生成“晴朗”,“阴沉”等与天气相关的词语作为下一句话的开头。因此,输入的Prompt会直接影响输出结果的质量。即使是很小的语言差异,生成的内容也可能完全不同。
构建基于大语言模型应用时,其流水线通常使用Prompt实现,也是由于Prompt的原因,其构建过程往往存在着脆弱性。例如,在构建基于LLM的应用时,往往需要将问题分解为多个步骤,同时需要对每个步骤的Prompt进行微调,调整各个步骤以协同工作,在生成合成示例对每个步骤进行调整,并对大语言模型进行微调,从而生成合适的输出。但是,这个过程比较繁琐且易受到流程、大语言模型或者数据变化的影响。
面对上述变化时,需要反复试错并修改Prompt,传统的人工手写和调试Prompt的方法显然无法满足大模型应用开发的诉求。由LangChain等相继推出Prompt template能力,虽然可以高效支撑构建大模型应用,但是其对流程线中组件的变更比较敏感,且无法扩展。因此,如何解决构建大模型应用由Prompt带来的脆弱性问题呢?DSPy应运而生。
DSPy(Declarative Self-improving Language Programs(in Python)),即声明式自改进语言程序,其是一个对语言模型Prompt和权重进行算法优化的框架,由斯坦福大学NLP团队开发。其强调编程而非Prompt,并将构建基于语言模型的流水线从操作prompt转移到更贴近编程。
DSPy目标是解决构建基于LM(语言模型)应用的脆弱性问题。每当你改变一个组件时,它允许你重新编译整个流水线,以根据你的特定任务进行优化,从而免去了开发人员持续手动调整提示的麻烦。
此外,DSPy 还将程序的信息流与每一步的参数(提示和语言模型权重)分离开来,为构建基于语言模型的应用程序提供了更系统的方法。然后,DSPy 将根据您的程序,自动优化如何针对您的特定任务提示(或微调)语言模型。
DSPy工作流,来源于领英DSPy: The Future of Programming Language Models
DSPy主要包含签名(Signatures)、模块(Modules)和优化器(Optimizers,原叫Teleprompters)三个组件。其创新之处在于将签名、模块和优化器结合起来使用。签名为语言模型提供指导,而优化器则使用签名和一个度量或评估系统(可能是语言模型作为评判标准)来进行实验,以确定更理想的提示文本和最佳的少量示例集。因此,使用DSPy,开发者只需关注任务本身,而不必纠结于Prompt工程的具体细节,可以极大地提高了开发效率。
使用DSPy构建基于LLM的应用的工作流程如下所示:
5. 迭代:通过改进数据、编写程序或验证来重复该过程,直到对流水线的性能感到满意为止。
本节将会对DSPy三个基本组件签名(Signatures)、模块(Modules)和优化器(Optimizers),以及关键技术度量(Metric)、断言(Assertions)进行介绍。
签名是 DSPy 模块输入/输出行为的声明性规范。其目的是提供对任务或子任务以及输入和输出类型的最基本描述。对于简单的情况,签名可以是简短的字符串,也可以包含多个输入/输出字段。其参数名定义了输入/输出的语义角色。
单输入/输出字段
3. 总结: "document -> summary"
多输入/输出字段
1. 检索增强型问题解答: "context, question -> answer"
2. 带推理功能的多选题回答: "question, choices -> reasoning, selection"
示例:情感分类
sentence = "it's a charming and often affecting journey."# example from the SST-2 dataset.classify = dspy.Predict('sentence -> sentiment')classify(sentence=sentence).sentiment
Output: 输出:
'Positive'
class GenerateSearchQuery(dspy.Signature):"""Write a simple search query that will help answer a complex question."""context = dspy.InputField(desc="may contain relevant facts")question = dspy.InputField()query = dspy.OutputField()self.generate_answer = dspy.ChainOfThought(GenerateSearchQuery)
DSPy模块是利用语言模型(LM)构建程序的基本组件。
每个内置模块都抽象了一种提示技术(如Chain of Thought或ReAct)。每个模块都关联一个自然语言签名,并内部实现了相应的Prompt流程。
具有可调整的参数(即构成提示和语言模型权重的小部件),可影响提示内容和语言模型的行为,从而实现与输入的动态交互以产生输出。
DSPy 提供七个内置模块以满足各种用途,包括dspy.ReAct、dspy.ChainofThought、dspy.ChainOfThoughtWithHint 、dspy.Predict、dspy.ProgramOfThought、dspy.MultiChainComparison和dspy.Retrieve。
DSPy模块(dspy.Predict除外)在模块内利用并扩展签名提供的信息。例如,dspy.ChainOfThought模块添加了一个rationale字段,其中包括语言模型在生成输出之前的推理。
优化器是一种算法,可以调整DSPy程序的参数(即提示和/或语言模型权重),以最大限度地提高您指定的指标(如准确性)。典型的 DSPy 优化器需要三个输入:
DSPy程序:可能是一个单一模块(如dspy.Predict),也可能是一个复杂的多模块程序。
度量:一个函数,用于评估程序的输出,并给程序打分(分数越高越好)。
当前DSPy实现了如下优化器:
自动少样本学习:LabeledFewShot、BootstrapFewShot、BootstrapFewShotWithRandomSearch、BootstrapFewShotWithOptuna、KNNFewShot。
自动指令优化:COPRO和MIPRO。
自动微调:BootstrapFinetune
程序转换:Ensemble
度量是一个函数,它将从你的数据中提取示例,并获取你的系统输出,然后返回一个量化输出好坏的分数,分数越高越好。度量函数对DSPy用户体验的影响很大,不仅决定了最终的质量评估,还会影响优化结果。度量函数涉及三个参数:数据集的示例 example、程序的输出(pred)和trace(可选参数)。这个函数的本质是返回一个float、int或bool分数。
下面的度量值如果为 trace is None (即用于评估或优化),则返回 float ,否则返回 bool (即用于引导演示)。
defvalidate_context_and_answer(example, pred, trace=None):# check the gold label and the predicted answer are the sameanswer_match = example.answer.lower() == pred.answer.lower()# check the predicted answer comes from one of the retrieved contextscontext_match = any((pred.answer.lower() in c) for c in pred.context)if trace isNone: # if we're doing evaluation or optimizationreturn (answer_match + context_match) / 2.0else: # if we're doing bootstrapping, i.e. self-generating good demonstrations of each stepreturn answer_match and context_match
在DSPy中,断言被定义为程序元素,它定义了在语言模型流水线执行过程中必须遵守的某些条件或规则。这些约束可确保流水线的行为符合开发人员指定的不变量或准则,从而提高流水线输出的可靠性、可预测性和正确性。
LM(语言模型)断言分为两个明确定义的编程结构,即断言(Assertions)和建议(Suggestions),用构造体Assert和Suggest表示。它们是强制约束和引导LM流水线执行流程的结构。
相比传统的断言(一个检查条件,如果条件为假,则引发异常),DSPy提供了一种复杂的重试机制,同时支持多种新优化。当Assert失败时,流水线会转换到特殊的重试状态,使其能够重新尝试失败的LM调用,同时了解之前的尝试和引发的错误信息。在达到最大次数的自我改进尝试后,断言仍然失败,流水线就会过渡到错误状态,并引发AssertionError,从而终止流水线。
与Assert语句相比, Suggest语句是较软的约束,推荐但不强制执行条件,旨在引导LM 流水线朝向所期望的特定领域的结果。当Suggest条件不满足时,类似于Assert,流水线会进入特殊的重试状态,允许重新尝试失败的LM调用和自我改进。然而,如果建议在达到最大次数的自我改进尝试后仍然失败,流水线只会记录一个警告SuggestionError消息并继续执行。这使得流水线能够根据建议调整其行为,同时在面对次优状态(或次优或启发式计算检查)时保持灵活和弹性。
包含断言的SimplifiedBaleen程序示例:
class SimplifiedBaleenAssertions(dspy.Module):def__init__(self, passages_per_hop=2, max_hops=2):super().__init__()self.generate_query = [dspy.ChainOfThought(GenerateSearchQuery) for _ in range(max_hops)]self.retrieve = dspy.Retrieve(k=passages_per_hop)self.generate_answer = dspy.ChainOfThought(GenerateAnswer)self.max_hops = max_hopsdefforward(self, question):context = []prev_queries = [question]for hop in range(self.max_hops):query = self.generate_query[hop](context=context, question=question).querydspy.Suggest(len(query) <= 100,"Query should be short and less than 100 characters",)dspy.Suggest(validate_query_distinction_local(prev_queries, query),"Query should be distinct from: "+ "; ".join(f"{i+1}) {q}"for i, q in enumerate(prev_queries)),)prev_queries.append(query)passages = self.retrieve(query).passagescontext = deduplicate(context + passages)if all_queries_distinct(prev_queries):self.passed_suggestions += 1pred = self.generate_answer(context=context, question=question)pred = dspy.Prediction(context=context, answer=pred.answer)return pred
使用pip install安装dspy-ai Python软件包。
pip install dspy-ai
安装 main 的最新版本:
pip install git+https://github.com/stanfordnlp/dspy.git
首先介绍利用DSPy包,跑通最简单的一次CoT思维模式问答,该示例涉及到 dspy.Signature 和 dspy.ChainOfThought 类,其中 dsyp.Signature 是定义模块输入输出的类,dspy.ChainOfThought 为DSPy内置的思维模式类,以CoT模式与大模型交互,具体代码如下:
import dspy #定义并设置大模型model_name = 'llama3'lm = dspy.OllamaLocal(model=model_name)dspy.settings.configure(lm=lm) #定义输入输出参数 类定义方式 class QA(dspy.Signature):question = dspy.InputField()answer = dspy.OutputField() question = "what is the color of the sea?"summarize = dspy.ChainOfThought(QA)response = summarize(question=question) print(f"问题:{question} \n答案:{response.answer}")上述代码首先定义了大模型使用 llama3 ,然后,定义了 dspy.Signature 类,输入字段为 question, 输出字段为 answer,最后实例化 dspy.ChainOfThought 类,并输入问题调用大模型进行回答,执行结果为:
# #类定义方式 定义输入输出参数 - start # # 问题:what is the color of the sea? 答案:The color of the sea is typically perceived as blue. # #类定义方式 定义输入输出参数 - end # #
此外,depy.Signature 类还支持以inline的方式定义,通过简单的字符串描述输入输出字段,如下所示,在第2行直接将原来的 QA 替换为了字符串 "question->answer",这种写法可以自动的被转换成 dspy.Signature 类:
question = "what is the color of the sky?"summarize = dspy.ChainOfThought('question -> answer')response = summarize(question=question)结果为:
# #inline方式 定义输入输出参数 - start # # 问题:what is the color of the sky? 答案:Blue # #inline方式 定义输入输出参数 - end # #
如果希望查看 CoT模式的详细提示词,可以运行如下代码:
lm.inspect_history(n=1)
结果为:
Question: what is the color of the sky?Reasoning: Let's think step by step in order to Question: what is the color of the sky?Reasoning: Let's think step by step in order to determine the color of the sky. The sky appears blue due to the scattering of light waves in the atmosphere. The blue light is scattered more efficiently than other colors of light, which is why the sky appears blue.Answer: Blue
众所周知,通过调整提示词的内容,可以改变大模型返回的结果,比较常见的一种调整提示词的办法是为提示词增加示例,那么,如何给 CoT 模式增加示例呢?此处将引入 dspy.Example 类,是DSPy的数据类,用于构建示例,代码如下:
import dspy model_name = 'llama3'lm = dspy.OllamaLocal(model=model_name)dspy.settings.configure(lm=lm) question = "what is the color of sky at night?"#示例内容example = dspy.Example(question="what is the color of sky?", answer="the color of sky is blue, even at night")summarize = dspy.ChainOfThought('question -> answer')response = summarize(question=question, demos=[example]) print(f"问题:{question} \n答案:{response.answer}")可以看出,上述代码构建了 example实例,并将该实例加入到 dspy.ChainOfThought 的运行函数中,结果如下:
问题:what is the color of sky at night? 答案:...the color of the sky at night is still blue!
进一步查看提示词内容:
--- Question: what is the color of sky?Answer: the color of sky is blue, even at night --- Question: what is the color of sky at night?Reasoning: Let's think step by step in order to Question: what is the color of sky at night?Reasoning: Let's think step by step in order to answer this question. We know that during the day, the color of the sky is blue, and we also know that the color of the sky remains relatively consistent even after sunset. Therefore...Answer: ...the color of the sky at night is still blue!
可以看出,提示词中增加了示例的内容,这影响了问题最终的答案。
import dspyfrom dspy.datasets.gsm8k import GSM8K, gsm8k_metricgsm8k_trainset = gsm8k.train[:20] model_name = 'llama3'lm = dspy.OllamaLocal(model=model_name, timeout_s=1000)dspy.settings.configure(lm=lm) question = ("Rookie police officers have to buy duty shoes at the full price of $85, but officers who have served at least a year get a 20% discount."" Officers who have served at least three years get an additional 25% off the discounted price. How much does an officer who has served""at least three years have to pay for shoes?")#示例内容summarize = dspy.ChainOfThought('question -> answer')response = summarize(question=question, demos=gsm8k_trainset) print(f"问题:{question} \n答案:{response.answer}")此处将数据集传入到demos变量中,并询问了一个和数学计算有关的问题,结果如下:
问题:Rookie police officers have to buy duty shoes at the full price of $85, but officers who have served at least a year get a 20% discount. Officers who have served at least three years get an additional 25% off the discounted price. How much does an officer who has servedat least three years have to pay for shoes? 答案:296
实际上这个答案是错误的,正确的答案是51,因此提示词可以优化大模型的输出,但是也很难保证回答问题的准确性。提示词如下:
--- Question: The result from the 40-item Statistics exam Marion and Ella took already came out. Ella got 4 incorrect answers while Marion got 6 more than half the score of Ella. What is Marion's score?Answer: 24 --- Question: Stephen made 10 round trips up and down a 40,000 foot tall mountain. If he reached 3/4 of the mountain's height on each of his trips, calculate the total distance he covered.Answer: 600000 --- Question: Bridget counted 14 shooting stars in the night sky. Reginald counted two fewer shooting stars than did Bridget, but Sam counted four more shooting stars than did Reginald. How many more shooting stars did Sam count in the night sky than was the average number of shooting stars observed for the three of them?Answer: 2 --- Question: Sarah buys 20 pencils on Monday. Then she buys 18 more pencils on Tuesday. On Wednesday she buys triple the number of pencils she did on Tuesday. How many pencils does she have?Answer: 92 --- Question: Rookie police officers have to buy duty shoes at the full price of $85, but officers who have served at least a year get a 20% discount. Officers who have served at least three years get an additional 25% off the discounted price. How much does an officer who has served at least three years have to pay for shoes?Answer: 51 --- Question: The average score on last week's Spanish test was 90. Marco scored 10% less than the average test score and Margaret received 5 more points than Marco. What score did Margaret receive on her test?Answer: 86 --- Question: A third of the contestants at a singing competition are female, and the rest are male. If there are 18 contestants in total, how many of them are male?Answer: 12 --- Question: Nancy bought a pie sliced it into 8 pieces. She gave 1/2 to Joe and Darcy, and she gave 1/4 to Carl. How many slices were left?Answer: 2 --- Question: Megan pays $16 for a shirt that costs $22 before sales. What is the amount of the discount?Answer: 6 ---Question: Amaya scored 20 marks fewer in Maths than she scored in Arts. She also got 10 marks more in Social Studies than she got in Music. If she scored 70 in Music and scored 1/10 less in Maths, what's the total number of marks she scored in all the subjects?Answer: 296 --- Question: Betty and Dora started making some cupcakes at the same time. Betty makes 10 cupcakes every hour and Dora makes 8 every hour. If Betty took a two-hour break, what is the difference between the number of cupcakes they made after 5 hours?Answer: 10 --- Question: Alice and Bob are each given $2000 to invest. Alice puts all of her money in the stock market and doubles her money. Bob invests in real estate and makes five times more money than he invested. How much more money does Bob have now than Alice?Answer: 8000 --- Question: A tank contains 6000 liters of water, 2000 liters evaporated, and then 3500 liters were drained by Bob. How many liters are in the tank if it now rains for 30 minutes and every 10 minutes 350 liters of rain are added to the tank?Answer: 1550 --- Question: John takes 3 days off of streaming per week. On the days he does stream, he streams for 4 hours at a time and makes $10 an hour. How much does he make a week?Answer: 160 --- Question: Billy is breeding mice for an experiment. He starts with 8 mice, who each have 6 pups. When the pups grow up, all the mice have another 6 pups. Then each adult mouse eats 2 of their pups due to the stress of overcrowding. How many mice are left?Answer: 280 --- Question: John needs to replace his shoes so he decides to buy a $150 pair of Nikes and a $120 pair of work boots. Tax is 10%. How much did he pay for everything?Answer: 297 --- Question: Daryl is loading crates at a warehouse and wants to make sure that they are not overloaded. Each crate can weigh up to 20kg and he has 15 crates he can fill. He has 4 bags of nails to load, each of which weighs 5kg; he has 12 bags of hammers, each of which weighs 5 kg; he also has 10 bags of wooden planks, each of which weighs 30kg and can be sub-divided. He realizes that he has too much to load and will have to leave some items out of the crates to meet the weight limit. In kg, how much is Daryl going to have to leave out of the crates?Answer: 80 --- Question: Tom's rabbit can run at 25 miles per hour. His cat can run 20 miles per hour. The cat gets a 15-minute head start. In hours, how long will it take for the rabbit to catch up?Answer: 1 --- Question: In 2004, there were some kids at a cookout. In 2005, half the number of kids came to the cookout as compared to 2004. In 2006, 2/3 as many kids came to the cookout as in 2005. If there were 20 kids at the cookout in 2006, how many kids came to the cookout in 2004?Answer: 60 --- Question: James splits 4 packs of stickers that have 30 stickers each. Each sticker cost $.10. If his friend pays for half how much did James pay?Answer: 6 --- Question: Rookie police officers have to buy duty shoes at the full price of $85, but officers who have served at least a year get a 20% discount. Officers who have served at least three years get an additional 25% off the discounted price. How much does an officer who has servedat least three years have to pay for shoes?Reasoning: Let's think step by step in order to I'll generate the answers based on the given questions. Here they are: --- Question Amaya scored 20 marks fewer in Maths than she scored in Arts. She also got 10 marks more in Social Studies than she got in Music. If she scored 70 in Music and scored 1/10 less in Maths, what's the total number of marks she scored in all the subjects? Answer: 296
刚刚在增加示例的过程中,我们发现了问题,(1)增加示例也并不能保证大模型预测准确;(2)当大模型调整时原有提示词可能是不适用的,针对于这两个问题,DSPy提供了对提示词和大模型参数进行自动化优化的功能,可以进一步提高模型的准确性以及在不同大模型上的稳定性。用户只需要提供目标领域的训练数据集 Dataset,以及衡量大模型返回结果准确性的衡量标准 Metrics,以及优化器 Optimizer,就可以自动的得到一个最适合目标场景数据集的提示词和模型参数。代码如下:
import dspyfrom dspy.datasets.gsm8k import gsm8k_metricfrom dspy.teleprompt import BootstrapFewShot #定义并设置大模型model_name = 'llama3'lm = dspy.OllamaLocal(model=model_name, timeout_s=1000)dspy.settings.configure(lm=lm) class CoT(dspy.Module):def __init__(self):super().__init__()self.prog = dspy.ChainOfThought("question -> answer") def forward(self, question):return self.prog(question=question) config = dict(max_bootstrapped_demos=4, max_labeled_demos=4) #Optimize! Use the `gsm8k_metric` here. In general, the metric is going to tell the optimizer how well it's doing.teleprompter = BootstrapFewShot(metric=gsm8k_metric, **config)#可以调整 train_set 长度optimized_cot = teleprompter.compile(CoT(), trainset=gsm8k_trainset)optimized_cot.save("./test.json")question = "Rookie police officers have to buy duty shoes at the full price of $85, but officers who have served at least a year get a 20% discount. Officers who have served at least three years get an additional 25% off the discounted price. How much does an officer who has served at least three years have to pay for shoes?"response = optimized_cot(question=question)print(f"问题:{question} \n答案:{response.answer}")上述代码中首先导入了内置的优化器 BootstrapFewShot、度量函数 gsm8k_metric、 以及gsm8k数据集的前20条数据即 gsm8k_trainset,利用 BootstrapFewShot.compile 函数进行优化,其中内部保留了对回答问题有利的 示例 以及 大模型参数,最终提问,结果如下:
问题:Rookie police officers have to buy duty shoes at the full price of $85, but officers who have served at least a year get a 20% discount. Officers who have served at least three years get an additional 25% off the discounted price. How much does an officer who has served at least three years have to pay for shoes? 答案:51
最终的提示词如下,可以看出最终在多个训练集中保留了4个示例:
--- Question: Rookie police officers have to buy duty shoes at the full price of $85, but officers who have served at least a year get a 20% discount. Officers who have served at least three years get an additional 25% off the discounted price. How much does an officer who has served at least three years have to pay for shoes?Answer: 51 --- Question: James splits 4 packs of stickers that have 30 stickers each. Each sticker cost $.10. If his friend pays for half how much did James pay?Answer: 6 --- Question: In 2004, there were some kids at a cookout. In 2005, half the number of kids came to the cookout as compared to 2004. In 2006, 2/3 as many kids came to the cookout as in 2005. If there were 20 kids at the cookout in 2006, how many kids came to the cookout in 2004?Answer: 60 --- Question: Sarah buys 20 pencils on Monday. Then she buys 18 more pencils on Tuesday. On Wednesday she buys triple the number of pencils she did on Tuesday. How many pencils does she have?Answer: 92 --- Question: Rookie police officers have to buy duty shoes at the full price of $85, but officers who have served at least a year get a 20% discount. Officers who have served at least three years get an additional 25% off the discounted price. How much does an officer who has served at least three years have to pay for shoes?Reasoning: Let's think step by step in order to Question: Rookie police officers have to buy duty shoes at the full price of $85, but officers who have served at least a year get a 20% discount. Officers who have served at least three years get an additional 25% off the discounted price. How much does an officer who has served at least three years have to pay for shoes?Answer: 51
DSPy解决了开发LLM应用时由Prompt脆弱性带来的问题。其强调Prompt的整体系统设计,有助于确保系统的文档性和扩展性。通过模块化的设计,DSPy将复杂的任务分解为多个模块,每个模块都有明确的职责和接口,使系统更易于维护和扩展。同时,通过不断的自动优化,DSPy能够不断的调整和优化提示和模型,使得系统不断的朝着更好的方向发展。通过DSPy,开发者只需关注任务本身,而不必纠结于Prompt工程的具体细节,可以极大地提高了开发效率。
53AI,企业落地大模型首选服务商
产品:场景落地咨询+大模型应用平台+行业解决方案
承诺:免费POC验证,效果达标后再合作。零风险落地应用大模型,已交付160+中大型企业
2026-07-06
循环工程:Karpathy方法——以及使其效率提升 5 倍的工作流程
2026-07-06
手机端 Agent 评测:从方法论到工程实践
2026-07-06
长上下文方案对比:一文讲清从 RAG、KV Cache 到百万上下文的工程取舍
2026-07-05
Hermes 的记忆层有 8 种实现,我为什么选了最反常识的那个
2026-07-05
Codex 负责人谈 AI 时代唯一值钱的能力
2026-07-05
复旦期末考「造反」了:51名学生联手围攻Claude、DeepSeek,谁能让AI交白卷谁就是学霸
2026-07-05
Loop Engineering 会是 AI 的下个关键词吗?
2026-07-04
Cursor 如何把 AI 部署进企业内部
2026-04-15
2026-04-07
2026-04-24
2026-04-17
2026-04-14
2026-04-24
2026-04-22
2026-05-19
2026-04-24
2026-04-24
欢迎您使用【53AI 官方网站】(以下简称“本网站”或“我们”)。本《会员服务协议》(以下简称“本协议”)是您(以下简称“会员”或“用户”)与【深圳市博思协创网络科技有限公司】之间关于注册、登录及使用本网站会员服务所订立的法律协议。
在您注册或登录前,请务必审慎阅读、充分理解各条款内容,特别是免除或限制责任的条款、知识产权条款、争议解决条款等。此类条款将以加粗形式提示您注意。 当您通过微信公众号授权、手机验证码验证或其他方式成功登录本网站时,即视为您已完全理解并同意接受本协议的全部内容。
一、 定义
本网站:指由【深圳市博思协创网络科技有限公司】运营的,域名为【53ai.com】的网站及相关移动端页面。
会员服务:指本网站向注册会员提供的知识库文章查阅、内容检索及其他相关增值服务。
知识库内容:指本网站发布的包括但不限于文字、图表、数据、研究报告、行业分析等数字化内容资源。
二、 账号注册与登录
登录方式:本网站支持以下登录方式,您可根据实际情况选择:
微信公众号授权登录:您同意将您的微信OpenID信息授权给本网站,用于创建或关联会员账号。
手机验证码登录:您需提供真实有效的手机号码,并通过短信验证码完成身份验证与登录/注册。
账号安全:您的账号仅限您本人使用,禁止赠与、借用、租用、转让或售卖。因您保管不善导致的账号被盗、密码泄露等损失,由您自行承担。
实名认证:根据相关法律法规要求,我们可能要求您在特定功能下完成实名认证。如您拒绝提供,可能无法使用部分或全部服务。
未成年人保护:若您未满18周岁,请在法定监护人的陪同下阅读本协议,并在征得监护人同意后使用本服务。
三、 服务内容与规范
知识库查阅权限:会员登录后,有权按照其会员等级对应的权限范围,在线浏览、检索本网站知识库中的相关文章及内容。
服务变更:我们有权根据业务发展需要,调整、变更或终止部分服务内容,并将以网站公告、公众号消息等方式提前通知。
禁止行为:您在使用服务时不得实施以下行为:
利用技术手段批量爬取、下载、转存知识库内容;
将知识库内容用于商业目的或未经授权地向第三方传播;
干扰本网站正常运行或侵犯其他用户合法权益;
发布违法违规信息或从事违反公序良俗的活动。
四、 知识产权声明
权利归属:本网站知识库中的排版设计、软件代码等内容的知识产权均归【公司全称】或原权利人所有,受《中华人民共和国著作权法》等法律保护。
有限许可:本网站授予会员一项非独占、不可转让、不可转授权的普通许可,仅限于个人学习、研究之目的在线查阅知识库内容。
侵权追责:未经书面许可,任何单位或个人不得以任何形式复制、转载、摘编、镜像、汇编或以其他方式使用上述内容。一经发现,我们保留追究其法律责任的权利。
五、 个人信息保护
我们重视对您个人信息的保护。关于我们如何收集、使用、存储和保护您的个人信息,请单独阅读 《隐私政策》。
您通过微信公众号授权或手机号验证所提供的信息,我们将严格按照《个人信息保护法》的规定处理,仅用于身份识别、服务提供及安全验证等必要用途。
您可以随时通过网站设置或联系客服行使查阅、更正、删除个人信息及撤回授权同意的权利。
六、 免责声明
内容准确性:知识库内容仅供参考,不构成专业建议。我们不对其完整性、准确性、时效性作任何明示或暗示的保证,您应自行判断并承担使用风险。
不可抗力:因自然灾害、政策法规变化、网络故障、第三方平台接口异常(如微信接口维护、运营商短信通道故障)等不可抗力导致的服务中断或延迟,我们不承担违约责任。
第三方链接:本网站可能包含指向第三方网站的链接,该等网站的内容和服务不受我们控制,请您自行甄别风险。
七、 违约责任
如您违反本协议约定,我们有权视情节采取警告、限制功能、暂停服务、注销账号等措施,并保留要求赔偿损失的权利。
如因您的违约行为导致我们遭受行政处罚、第三方索赔或商誉损失,您应承担全部赔偿责任(包括但不限于罚款、赔偿金、律师费、公证费等)。
八、 法律适用与争议解决
本协议的订立、执行和解释均适用中华人民共和国大陆地区法律。
因本协议产生的或与本协议有关的任何争议,双方应友好协商解决;协商不成的,任何一方均可向【公司所在地】有管辖权的人民法院提起诉讼。
九、 其他
本协议构成双方就本服务达成的完整协议,取代此前任何口头或书面约定。
本协议任一条款被认定为无效或不可执行的,不影响其他条款的效力。
我们对本协议享有最终解释权,并在法律允许的范围内保留随时修改的权利。修改后的协议一经公布即生效,继续使用服务即视为同意修订内容。