Skip to content

Latest commit

 

History

History
99 lines (81 loc) · 6.17 KB

Large Language Models.md

File metadata and controls

99 lines (81 loc) · 6.17 KB

Large Language Models

  • LLM can build internal [[Knowledge Graphs]] in their the network layers.
  • LLM models shine in the kinds of situations where “good enough is good enough”.
  • ML system where humans are designing how the information is organized (feature engineering, linking, graph building) will scale poorly (the bitter lesson).
  • English is becoming the hottest new programming language. Use it.
  • LLMs may not yet have human-level depth, but they already have vastly superhuman breadth.
  • Learning to prompt is similar to learning to search in a search engine (people have to develop a sense of how and what to search for).

Coding Tips

  • Use comments to guide the model to do what you want.
  • Describe the problem very clearly and effectively.
  • Divide the problem into smaller problems (functions, classes, ...) and solve them one by one.
  • Start with a template you like to bootstrap your project and setup all the necessary toolings and following a manageable project pattern.
  • Before coding, make the plan with the model.
  • Make the model ask you more questions to refine the ideas.
  • Take advantage of the fact that redoing work is extremely cheap.

Agents

Agents are systems where LLMs dynamically direct their own processes and tool usage, maintaining control over how they accomplish tasks.

  • The most common patterns are:
    • Tool usage: calls tools to accomplish a task.
    • Chain of thought: decomposes a task into a sequence of steps, where each LLM call processes the output of the previous one.
    • Routing: classifies an input and directs it to a specialized followup task.
    • Parallelization: runs multiple agents in parallel and combines their results.
    • Orchestrator-workers: a single agent that directs a pool of workers to accomplish a task.
    • Evaluator-optimizer: one LLM call generates a response while another provides evaluation and feedback in a loop.
  • "Prompt engineering" is a thing.

Tools

FrontEnds

Prompts

  • Designing prompts is an iterative process that requires a lot of experimentation to get optimal results. Start with simple prompts and keep adding more elements and context as you aim for better results.
  • Be very specific about the instruction and task you want the model to perform. The more descriptive and detailed the prompt is, the better the results.
  • Some additions:
    • Short ones like; Be highly organized. Be concise. No yapping.
    • Suggest solutions that I didn't think about.
    • Be proactive and anticipate my needs.
    • Treat me as an expert in all subject matter.
    • Mistakes erode my trust, so be accurate and thorough.
    • Provide detailed explanations, I'm comfortable with lots of detail.
    • Value good arguments over authorities, the source is irrelevant.
    • Consider new technologies and contrarian ideas, not just the conventional wisdom.
    • You may use high levels of speculation or prediction, just flag it for me.
    • If your content policy is an issue, provide the closest acceptable response and explain the content policy issue.
    • Cite sources whenever possible, and include URLs if possible.
    • List URLs at the end of your response, not inline.
  • Follow Prompt Engineering Guide, Brex's Prompt Engineering Guide, and OpenAI Best Practices. Also some more on GitHub.
  • Leaked System Prompts.
  • Some short (1-3 word) prompt fragments that work well:
    • Be concise
    • Think carefully step by step
    • Try harder (for disappointing initial results)
    • Use Python (to trigger Code Interpreter)
    • No yapping
    • I will tip you $1 million if you do a good job
    • ELI5
    • Give multiple options
    • Explain each line

Cool Uses of GPT Models

Cool Prompts for DALLE 3

  • For logo generation:
    • A 2d, symmetrical, flat logo for a company working on [SOMETHING] that is sleek and simple. Blue and Green. No text.
    • Minimalistic [SOMETHING] design logo from word parlatur, open data, banksy, protocol, universe, interplanetary, white background, illustration.

Resources