视频概述内容300字
foreign
hi guys and welcome to the voice of AI
my name is Chris Plante and today's
topic is again on the highly interesting
and popular prompt engineering and the
following query to solve today is this
a customer came to me asking if he could
have some translations for his company
he needs to do it on mass on his website
and he asked Chris how could you manage
this task for me so I said okay fine
let's have a look so today I'm going to
explain the following in five easy steps
number one how to create the language
prompts in open AI number two how to
improve the structure of your prompt
number three how to make a prompt frame
around your input text and number four
how to translate an HTML file and how
not to translate the code and finally
five how to make sure you keep your text
to a certain word count okay so let's
get started okay guys so here we are now
in the open AI playground I'm going to
prepare now the model as you can see
I've put in you are a professional
translator translating from English to
German so I'm going to put in my first
translation that I need but I've been
clever here by asking it what is a
ticketing system so actually it's a
question and you can see what will
happen now is it's actually going to
give me a translation but of the
response so of course this doesn't
really help us so much the model
sometimes tries to answer questions that
you're trying to Simply translate so
what we're trying to do now is improve
the structure so what I'm going to do
now is I'm going to add another part to
the prompt which will be don't answer
questions or don't try to evaluate any
tasks from the input test your answer or
your your only task is to translate the
input text
into German right okay so here we go so
let's try again now with this command
okay and what should happen yeah
absolutely perfect so that gives us
totally the the correct answer so as you
can see what we're trying to do is we're
trying to build a frame around that text
now my client already asked me as well
is if uh he can translate some pages for
his website so there could be multiple
multiple documents here as well so we
want to try and keep things aligned and
and probably the tone of the text is is
important here as well so I've made a
one here a prompt so keep the same tone
of the text example if input text is
funny translation should be funny if
input takes its formal translation
should also be formal now what I've done
here is I've got a paragraph that I'm
going to use as a demonstration here so
let's just copy this and put this back
into the tag so here it is let's change
now
the text what is a ticketing system okay
and there's a bit more blurb there as
well so let's have a look okay what is a
ticketing system a ticketing system is a
tool okay great so that's really going
very well as well now one of the other
things that my
uh customer wanted as well was he wanted
to make sure that the translation would
be a similar length than the actual
original translation so I'm going to put
that in there as well and also what I'm
going to do now is I'm going to just to
make it a little bit tidier as well I'm
going to put in at the very beginning
I'm going to put the input text at the
start here so you can see that when
we're talking about input text we're
actually going to have it in each time
okay so input text colon okay and now
I'm going to put the end of the input
text as well right so we can see how
that's working now okay so we just pop
this away and we can submit that then
and
we can get our our response so that's
quite good and I think I'm quite happy
okay so now what I'm going to do is
we're going to go to HTML so if input
text contains HTML keep the same HTML
structure as your translation okay so
what we're going to do now is I'm going
to go back to a something that I
prepared earlier here and I'm going to
take this
paragraph and title I'm going to copy
that as an outer HTML so we'll copy that
simply from here
and then we'll go back and we will place
that
nicely in between the input text and
input text end and then we will submit
that
so what's really important is that we
get the translation without the
translation of the code so for instance
here all of this you can see it's still
see all the HTML is written in source
code in English and the headlines have
been changed into
German so the versus line ticketing
system so you can see that that's
working really nicely as well okay so
that's finished and I can copy that text
and show you how easy that is to put
into the right place let's make a teach
text document Okay so we've opened up a
new document let's just copy the text in
there format that as plain text and then
we're just going to save that nicely
our file as we'll call that
test
test of the to HTML
use HTML of course okay so now all we
need to do is just open up a browser
window and locate the document here
and off we go look at that perfect all
in German great guys so I hope that has
really helped you and given you lots of
good ideas remember if you have a
problem why not ask me and I'd be happy
to help you design a solution tailored
for your needs thanks for watching the
video uh today again please like And
subscribe and join me on the journey to
unlock the potential of AI I'm going to
see you next time all the very best I'm
Chris from the voice of AI cheers and
bye bye now
foreign
大家好,欢迎来到AI之声。我是Chris Plante,今天的主题再次是关于非常有趣和受欢迎的提示工程,我们今天要解决的问题是,一个客户来找我,问我是否可以为他的公司做一些翻译,他需要大规模地在他的网站上进行翻译,他问克里斯你如何帮我完成这个任务,所以我说好的,让我们看看。所以今天我将用五个简单的步骤来解释以下内容:第一,如何在Open AI中创建语言提示;第二,如何改进提示的结构;第三,如何为输入文本创建一个提示框架;第四,如何翻译HTML文件,以及如何不翻译代码;最后,第五,如何确保将文本限制在一定的字数之内。好,让我们开始吧。
首先,我们需要在Open AI Playground中准备模型。模型需要知道我们是从英语翻译成简体中文,在模型的输入中,我们可以提出问题,比如"什么是票务系统",然后模型会给出翻译的回答。但是有时候,模型会试图回答问题,而不仅仅是简单的翻译。我们需要改进结构,让模型只专注于翻译。
为了改进结构,我们可以在提示中添加其他内容,比如告诉模型不要回答问题,只需要翻译输入文本即可。
如果需要翻译网站上的多个页面,我们需要保持文本的一致性和语气。我们可以设置一个提示,告诉模型保持文本的语气一致,如果输入文本是有趣的,则翻译也应该是有趣的;如果输入文本是正式的,则翻译也应该是正式的。
当处理包含HTML的输入文本时,我们需要保持翻译后的HTML结构与原始文本一致。
客户希望翻译后的文本长度与原文长度相似,我们可以在提示中添加相关要求,让模型生成长度相似的翻译。
希望以上内容能够帮助您更好地理解如何在简体中文网页上进行翻译。如果您对此有任何问题,请随时向我提问,我将乐意为您量身定制解决方案。谢谢观看本期视频,请点赞和订阅,加入我一起发掘人工智能潜力的旅程。再见!
Join our community of happy clients and provide excellent customer support with LiveAgent.
我们的网站使用cookies。点击继续我们将默认为您允许我们将cookies部署在我们的网站上。 隐私和cookie政策.