Questions and answers
20 questions from the community, answered by the
authors in
#book-of-the-week
on Slack.
-
Max asked
Hi James and Mike.
As models become more smarter, do you think prompt engineering will be as useful - or emphasized - as it is now? Maybe smarter models would be able to understand even the less curated prompts? Just like ChatGPT is able to overlook typos in queries...
-
Ruddi Rodriguez asked
Hi James and Mike , Do you think that we will find consistent results for same applications across different platforms or companies based on prompts ?
-
Ruddi Rodriguez asked
Another question , what in your opinion should be the best way to test different prompts when is about generative ? I use another llm to verify the information , but sometimes can be like an infinite loop.
-
Ruddi Rodriguez asked
What do you think should be the best approach for production ,in terms of prompt generation ? To use platforms like langchain or to build everything from zero . The use of platformas like langchain looks to me help to the developer to focus in more essential.
-
Plinio Zanini asked
In what type of problems would a few-shot classification model using LLM be able to obtain good performance compared to traditional ML methods?
-
Plinio Zanini asked
How does the prompting change when using different models? Should a prompt change significantly from a simpler smaller model than ca be run locally vs the GPT4, for example?
-
Plinio Zanini asked
How to figure out when a model is simply not good enough for prompt engineering to do the trick and fine tunning or a more capable model (potentially bigger) should be used?
-
Marcin Mazur asked
Hi, can you recommend any reliable methods of structure enforcement that are not simple masking of logits? If answer is yes, have you seen any of them used in prod?
-
Prashant asked
What is the best way to capture all the variants of a prompt with their result to make a decision later? Any suggested tools or approach to make this efficient?
-
Max asked
Which library/tool do you recommend that does a systematic evaluation of different prompting techniques? I see one by Microsoft called 'Prompt Engine'
-
Kathryn Armitstead asked
We hear alot about AI research and developments, but in practice it seems that most companies do not have Gen AI in production - particularly small to medium size companies. Assuming you agree with this perspective, how do you see it changing over the next few years and what will enable smaller companies to take advantage of the new capabilities?
thanks (it looks a great book from the reviews!)
-
Ruddi Rodriguez asked
Hi James and Mike
Thank you for taking your time to answer so far, I have another question . I am working in a problem where based in a list of questions-answer that characterized a persona attributes, I generated descriptions of different aspect of the personality. I realized that the model uses a selection of the questions-answer instead of based the description in all of them. Eventually if you run the same profile several times , you will find that some questions are use more than others , with a huge amount of runs it will use at least once all the questions , but the frequency distribution is like exponential with some questions used more frequently and others much less. I assumed this is a way for the model to optimize the token it use.
Giving this I see 3 different ways to approach this
1- To do nothing and let the model to be free selecting questions-answers .
2- After several experiments to use the most frequent questions. However, I do think that can be a case where one of the lees frequent question will be relevant .
3- Reshape the prompt to force the model to use all the information.
In your opinion what could be a good approach ? of course this need to be tested , but in a first sight , thanksss
-
Ruddi Rodriguez asked
Hi James thanks for all you answers , we recently found that when using a nested json for a function call , sometimes some of the fields can be missed , and it get worst with the deep of the json. It is possible to achieve same result using prompt with indentation : `"""Your task is to parse an unstructured request for a market research solution and turn it into a JSON containing the most important information. The request can describe one or more designs for different countries. The JSON should consist of the following information:`
`- Study (field name: "study", field type: str)`
`- A list of markets (field name: "markets", field type: array), where each market consists of:`
`- The country name (field name: "country", field type: str)`
`- The city name (field name: "city", field type: str, can be left empty if not mentioned)`
`- Additional information (field name: "additional_information", field type: array) containing:` and declaring the type and examples of expected field. since it is supposed that function call is one step ahead , the question is: would be better to try to improve the json of the function call ? or coming back the raw prompt with indentation as above is a good practice? Considering also that a model like llama does not support function calls
-
Ruddi Rodriguez asked
Another question in your experience , how we can make the generated text more real and human, I am working in a project to generated the personality profile of a persona based on basic information of the persona and to be honest, it si hard to make the model to generate profiles without a history of resilience or avoid to use words like vibrant and others adjectives . I have instructed the prompt to use spartan vocabulary plain english , etc etc but it still hard.
-
Dr Abdulrahman Baqais asked
Hello James:
Do you think we need promptvengineering techniques for non-latin languages? Or just translating it to English is sufficent?
-
Dr Abdulrahman Baqais asked
A second question is:
How do you see the future of prompt engineering aftet the release of DSPy?
-
Roman Zabolotin asked
Hi James and Mike.
I've had a look through your book and was very interested in the topics you cover.
There is an opinion that the capabilities of LLMs grow with the size of their memory, and have now reached a threshold where only big players like OpenAI and Anthropic can train next-generation models. It seems that even Meta is not planning to make their next models publicly available. How do you see the future of the LLM market? Is there room for open-source solutions?
-
Roman Zabolotin asked
Fine-tuning is available for open-source models and some proprietary ones, while prompt engineering is universally applicable. In your experience, which approach tends to be more effective, and under what circumstances?
-
Roman Zabolotin asked
Additionally, I've noticed that prompts can sometimes become quite large, reaching 2000-3000 tokens per request, often due to numerous few-shot examples. Is this considered a normal practice in the industry? What are the trade-offs of using such large prompts compared to other methods like fine-tuning or more concise prompting strategies?
-
Ella asked
Hi James and Mike.
Been trying to grasp all the vocab and terms to understand content about LLMs and Generative AI.
Do you have recommendations what core-concept and what methodologies we have to really really grasp like the back of our hand, as
- models become smarter
- tokens get faster and cheaper
- context windows getting bigger and bigger?
So that we can swap out the new models that seem to keep coming out each and every week?
Want the whole story?
The answers above are the short version of Prompt Engineering for Generative AI.