Skip to content

Instantly share code, notes, and snippets.

@zk
Created March 20, 2023 23:51
Show Gist options
  • Save zk/7d63edee7d725a631a9aad52557db30f to your computer and use it in GitHub Desktop.
Save zk/7d63edee7d725a631a9aad52557db30f to your computer and use it in GitHub Desktop.

Here is a conversation between the user and you, the AI assistant. Please remember it. Please respond to this message with "Got it, here's a summary of the conversation so far:" and a summary of the conversation so far.

== User == Hey assistant, good afternoon!

== Assistant == Good afternoon! I'm here to help you with whatever you need. What can I do for you today?

== User == I'd like to write a paper in the style of something you'd find published in IEEE Transactions on Pattern Analysis and Machine Intelligence

== Assistant == I'd be happy to help you get started on a paper for IEEE Transactions on Pattern Analysis and Machine Intelligence. To begin, let's outline the key sections of the paper, which typically include:

  1. Title
  2. Abstract
  3. Introduction
  4. Related Work
  5. Methodology
  6. Experiments and Results
  7. Discussion
  8. Conclusion
  9. References

Here's a sample outline for a paper:

Title: "Deep Hybrid Learning for Improved Handwritten Digit Recognition"

Abstract: In this paper, we propose a novel deep hybrid learning approach

== User == The paper is about a novel approach to establishing context for LLM prompts.

== Assistant == Title: "Context-Aware Prompting: A Novel Approach for Improving Language Model Performance"

Abstract: In this paper, we propose a novel approach for establishing context in prompts for large language models (LLMs) to enhance their performance and adaptability. By employing a context-aware prompting strategy, we demonstrate significant improvements in LLM-generated responses in terms of relevance, coherence, and overall quality. We also investigate the impact of various contextual factors on model behavior and provide insights into their importance for real-world applications.

  1. Introduction

Language models

== User == Specifically, this approach works well where prompt token limits are fixed.

== Assistant == Title: "Optimizing Context within Token Limits: A Novel Approach for Enhancing Large Language Model Performance"

Abstract: In this paper, we propose a novel approach for establishing context in prompts for large language models (LLMs) under fixed token limits. By

== User == Stop responding with the paper's content, I'd like to provide you with more information before getting back to that.

== Assistant == Of course! Please feel free to provide more information, and I'll be happy to help you incorporate it into your paper or address any other questions or concerns you may have.

== User == The invariants we assume will be true for any LLM are the following: 1. Token limits will increase over time, however there will always be a hard limit on the amount of context you can fit into a single prompt. 2. The total amount of possible context can be greater than this token limit. 3. There is a point where fine-tuning a model is a better solution to providing large amounts of context to a prompt, but before this point it's more efficient to provide relevant context within the prompt.

== Assistant == Thank you for providing this additional information. Now that I have a clearer understanding of the assumptions and constraints for your novel approach, we can incorporate these invariants into the paper's content. Here's an outline of how you could structure your paper:

  1. Introduction
    • Briefly introduce the concept of large language models (LLMs) and their current limitations.
    • Discuss the importance of establishing context for LLM-generated responses.
    • Introduce the three invariants assumed for the novel approach.
  2. Related Work
    • Review previous research and methods for providing context to LLMs.
    • Discuss existing limitations and how the proposed approach addresses them.
  3. Methodology
    • Describe the novel approach for optimizing context within token limits.
    • Explain how this approach addresses the three in

== User == I'll describe the method now, please ask relevant questions if you have them.

== Assistant == Great! Please go ahead and describe the method, and I'll be sure to ask any relevant questions to help clarify or expand on the details.

== User == Given a corpus of information on a subject not already trained into an LLM model, we would like to provide that corpus of information to the LLM as part of the user's prompt. This presents a problem when the tokenized corpus of information is larger than the LLM's single prompt token limit.

== Assistant == Thank you for describing the method. I have a few questions to help clarify and expand on the details:

  1. How do you plan to preprocess the given corpus of information to make it more suitable for inclusion in a prompt? Are there any specific techniques you intend to use to condense or summarize the information?
  2. Will the proposed method involve any iterative or adaptive processes to determine the most relevant portions of the corpus to include within the token limit?
  3. How does the method handle varying degrees of relevance among different parts of the corpus? Is there a mechanism for prioritizing or weighting the importance of information?
  4. In cases where the corpus content is highly interconnected, how does the method ensure that the context provided in the prompt maintains coherence and consistency?

Feel free to address these questions or provide any additional information that you think would be helpful for understanding your proposed method.

== User == The working name of this method is "Prompt Context Trees"

== Assistant == Thank you for providing the working name of the method, "Prompt Context Trees." Given the context you've provided so far, I have a few more questions related specifically to this method:

  1. How does the "Prompt Context Trees" method structure or organize the information in the corpus to determine which portions to include within the token limit? Does it involve any hierarchical or tree-based representations?
  2. Are there any specific algorithms or techniques used within the "Prompt Context Trees" method to traverse, search, or select the most relevant information from the corpus?
  3. Can you describe how the "Prompt Context Trees" method handles cases where multiple pieces of information from the corpus have similar relevance or importance? Are there any tie-breaking mechanisms or criteria for prioritizing content?
  4. Is the "Prompt Context Trees" method designed to work with specific types of corpora, or is it intended to be a generalizable solution for various domains and content types?

Your responses to these questions will help to better understand the "Prompt Context Trees" method and how it addresses the problem of providing context within the LLM's single prompt token limit.

== User == Can you help me come up with a better name than that?

== Assistant == Certainly! A suitable name should reflect the method's purpose and approach. Based on the information you've provided so far, here are some suggestions:

  1. Context Condensation for Prompts (CCP)
  2. Efficient Context Selection (ECS)
  3. Adaptive Contextual Prompting (ACP)
  4. Relevant Context Extraction (RCE)
  5. Token-Limited Contextualization (TLC)

Feel free to choose one of these names, modify them, or come up with an entirely new name that you think best represents your method.

== User == Love that last one, let's call it Token-Limited Contextualization

== Assistant == Great! Now that we've settled on the name "Token-Limited Contextualization," we can adjust the outline to incorporate the method's name and any further details you've provided. Here's an updated version of the paper outline:

  1. Introduction
    • Briefly introduce the concept of large language models (LLMs) and their current limitations.
    • Discuss the importance of establishing context for LLM-generated responses.
    • Introduce the three invariants assumed for the novel approach.
    • Present the Token-Limited Contextualization (TLC) method.
  2. Related Work
    • Review previous research and methods for providing context to LLMs.
    • Discuss existing limitations and how the TLC method addresses them.
  3. Methodology
    • Describe the Token-Limited Contextualization (TLC) method and its main components.
    • Explain how TLC addresses the three invariants and the problem of token-limited prompts.
    • Detail the process of selecting and organizing relevant information from the corpus using TLC.
  4. Experiments and Results
    • Describe the experimental setup, including the LLM used and the types of corpora tested.
    • Present the results of applying TLC to various prompts and compare them to other context-establishing techniques.
  5. Discussion
    • Analyze the strengths and weaknesses of the TLC method.
    • Discuss the implications of the results and potential areas for further research.
  6. Conclusion
    • Summarize the main findings and contributions of the paper.
    • Highlight the significance of the TLC method for improving LLM performance under fixed token limits.
  7. References
    • List the sources cited throughout the paper.

You can now expand on each section with the information you've provided, as well as any additional details or explanations needed to make your paper complete and comprehensive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment