前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >使用ChatGPT从Hacker News提取码农必读书籍

使用ChatGPT从Hacker News提取码农必读书籍

原创
作者头像
brzhang
修改2023-10-04 18:56:45
2280
修改2023-10-04 18:56:45
举报
文章被收录于专栏:玩转全栈玩转全栈

Hacker News 推荐的书籍相对来讲,质量还是不错的,因此有人就想了一个办法,借助ChatGpt来分析推荐数据,整理出了排名前50的推荐书籍。分析这些数据,大概花了 40美刀。

下面这个是prompt

代码语言:javascript
复制
prompt = [
            {"role": "system", "content": "Assistant that identifies book titles and authors in the following document and shows the words you match to a book title from. Some titles may be abbreviated, please expand the abbreviated title. If the document talks about an author but doesn't mention a book, leave \"title\" blank. If you know who the author is, provide the author. Don't include the book's subtitle. If the text is asking for a recommendation, without mentioning a book, then return an empty array. Provide your answer in a json array."}
            {"role": "user", "content": 'Wren\'s Explosion https://www.amazon.com/gp/395, and any Plath."'},
            {"role": "assistant", "content": '''[{"match":"'Wren's Explosion","title":"Explosion","author":"P.C. Wren","link":"https://www.amazon.com/gp/395"}, {"match":"any Plath","title":"", "author":"Sylvia Plath"}]'''},
            {"role":"user", "content":"3-days free trial isn't freemium."},
            {"role":"assistant", "content":"[]"},
            {"role":"user", "content": "Miranda Hamilton"},
            {"role":"assistant", "content": '''[{"match":"Miranda Hamilton","title":"Hamilton","author":"Lin-Manuel Miranda, Jeremy McCarter","link":""}]'''},
        ]

提取的书籍数据类似与这样的json结构

代码语言:javascript
复制
[
  {
    "match": "Hitchhiker's Guide Vms Unsupported Undocumented Can Go Away At Any Time Feature",
    "title": "The Hitchhiker's Guide to the Galaxy",
    "author": "Douglas Adams",
    "link": "http://www.amazon.com/Hitchhikers-Guide-Vms-Unsupported-Undocumented-Can-Go-Away-At-Any-Time-Feature/dp/1878956000"
  }
]

以下是排名前 50 的书籍推荐:

#

书名

作者

推荐次数

1

Structure and Interpretation of Computer Programs

Abelson and Sussman

376

2

G?del, Escher, Bach

Douglas Hofstadter

293

3

How to Win Friends and Influence People

Dale Carnegie

292

4

The C Programming Language

Brian Kernighan, Dennis Ritchie

284

5

Dune

Brian Herbert

263

6

Thinking, Fast and Slow

Daniel Kahneman

244

7

Meditations

Descartes

233

8

Atlas Shrugged

Ayn Rand

222

9

The Art of Computer Programming

Donald E. Knuth

213

10

Sapiens: A Brief History of Humankind

Yuval Harari

205

11

Zen and the Art of Motorcycle Maintenance

Robert M Pirsig

203

12

The Pragmatic Programmer

Andrew Hunt

203

13

Introduction to Algorithms

Charles E. Leiserson, Clifford Stein, Ronald Rivest, Thomas H. Cormen

171

14

The Selfish Gene

Richard Dawkins

168

15

Code: The Hidden Language of Computer Hardware and Software

Charles Petzold

160

16

The Mythical Man-Month

Fred Brooks

159

17

The Black Swan

Nassim Nicholas Taleb

158

18

Designing Data-Intensive Applications

Martin Kleppman

153

19

1984

George Orwell

152

20

Code Complete

Steve McConnell

149

21

Snow Crash

Neal Stephenson

146

22

The Three-Body Problem

Cixin Liu

143

23

Ender’s Game

Orson Scott Card

143

24

The Design of Everyday Things

Don Norman

136

25

Bible

Unknown

134

26

Founders at Work

Jessica Livingston

133

27

Antifragile

Nassim Nicholas Taleb

130

28

Man’s Search for Meaning

Victor E. Frankl

129

29

The Hitchhiker’s Guide to the Galaxy

Douglas Adams

128

30

Cryptonomicon

Neal Stephenson

127

31

The Fountainhead

Ayn Rand

127

32

Surely You’re Joking, Mr. Feynman!

Richard Feynman

125

33

Fooled by Randomness

Nassim Nicholas Taleb

125

34

Siddhartha

Herman Hesse

124

35

Foundation

Isaac Asimov

123

36

The Lord of the Rings

J. R. R. Tolkien

121

37

Zero to One

Peter Thiel

115

38

Calculus

Charles B. Morrey Jr., Murray H. Protter

114

39

Neuromancer

William Gibson

112

40

The Phoenix Project

Gene Kim

110

41

The Lean Startup

Eric Ries

110

42

Never Split the Difference

Chris Voss

108

43

Design Patterns

Addy Osmani

107

44

Guns, Germs, and Steel

Jared Diamond

107

45

JavaScript: The Good Parts

Douglas Crockford

106

46

Clean Code

Robert C. Martin

106

47

Deep Work

Cal Newport

105

48

The Elements of Computing Systems

Noam Nisan, Shimon Schocken

104

49

The Little Schemer

Daniel P. Friedman, Matthias Felleisen

102

50

Influence: The Psychology of Persuasion

Robert B. Cialdini

101

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档
http://www.vxiaotou.com