~/talk

ChatGPT: query Elasticsearch using natural language in PHP

Talkat phpday 2023 · 2023-05-18..05-19· [ai-assisted-development]
slides:none on file

An experimental PHP library translates natural-language sentences into elasticsearch DSL by sending a mapping-based prompt plus the index mapping to OpenAI GPT, returning compressed JSON queries and executing them against Elasticsearch; it caches translations with md5-file caching to avoid repeat API calls, recommends temperature=0 for deterministic outputs, demonstrably produces runnable queries from examples but warns of hallucinations and is not safe for unreviewed production use.

AI-written summary · about

  1. 0:00Introduction
  2. 1:04What is ChatGPT
  3. 2:10Prompts and limitations
  4. 3:36GPT-4 overview
  5. 4:21Live demo
  6. 6:35Code generation risks
  7. 7:38Elasticsearch DSL intro
  8. 9:03Natural language to queries
  9. 10:55ChatGPT with Elasticsearch mapping
  10. 13:05Prompt design
  11. 14:11Prompt as new code
  12. 15:15Project architecture
  13. 15:58Caching for performance
  14. 17:05Exploring repository
  15. 18:12PHP library setup
  16. 20:00Stock market example
  17. 21:52Translation performance
  18. 22:16ChatGPT limitations
  19. 22:59Developer course
  20. 23:42Q&A
  21. 24:05Privacy with prompts
  22. 25:27Stable prompt responses
  23. 26:50Validating responses
  24. 30:26Safe use cases
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.