The conversation

Lessons learnedExperience excerpt · English

I used prompt engineering to get a translation quality and readability better than what I can get …

… I used prompt engineering to get a translation quality and readability better than what I can get through Google Translate. This isn't a short document but it's not very long either. I had to break it into three in order to get ChatGPT to translate it all. In case anyone is curious about the final translation: https://gist.github.com/FooBarWidget/201ea5e0983d05d21f6719b... This is the prompt I used, incorporating prompt engineering lessons I've learned. I assigned a role to the LLM, provided appropriate context, and provided constraints for its output. > You are a Chinese-to-English translator with decades of experience translating Chinese government policy documents to an audience that's not familiar with Chinese governance, nor with the way that the Chinese government writes. What follows is a part of a draft policy document on potentially regulating AI chat services. The Chinese government has asked the public for feedback. > Begin introduction: > ... > End introduction. > Begin part of policy document body: > ... > End part of policy document body. …

Original discussionMaximizing the Potential of LLMs: A Guide to Prompt Engineering176 source comments · at import
5

Community replies 0

No community replies yet. Add your perspective.

Replies from the source 5

Direct replies available in this import. Original-language excerpts.

SU

Progressive summarization works pretty well - I'm using that for https://findsight.ai You can even get lesser LLMs to do the bulk reduction that have GPT clean it up on the way to even less content. Admittedly, that does take a lot of prompt engineering, chunk selection and reinforcement though (LLM supervising LLM).

Full original
AL

If telling Chat GPT that it has “decades of experience” leads to better results, why not say centuries of experience instead? If you don’t know how every token of input affects the output, is engineering an accurate way to describe what you’re doing?

Full original
RU

Very interesting use of ChatGPT and prompt engineering. For your problem, summarizing a large document, splitting the document into smaller parts is indeed the way to go. I also had problems myself with operating on large documents. In my case, I had an insurance policy that I wanted to extract information from. My solution: use the OpenAI API to convert the document to OpenAI's embeddings and saving those embeddings to a vector database. Then, use similarity search on the database to find chunks of the document that might be related to my query and pass only those chunks to GPT for the information extraction prompt. I plan to create a guide on how to tackle these problems after I consolidate my findings.

Full original
V4

I've actually coded something like this. The trick is to split it in a smart way. What I did is the following: 1. Download the video 2. Split it in max length for whisper 3. Used whisper for transcription on the chunks 4. Used gpt for cleaning the transcription 5. Unioned the cleaned transcribed chunks 5. Used the langchain "refine" function of the summary chain It is quite slow and expensive because the refine summary is doing a lot of calls, but the result is amazing. And you don't need a vector DB for that because the summary is serial. For Q&A tho, an embeddings DB is a must

Full original
FR

Try Universal Summarizer. No token limit. https://kagi.com/summarizer

Full original
Continue on Hacker News

Respect different perspectives. Share concrete experiences.

Sign in to post, reply, repost, and quote.