Skip to content

Commit

Permalink
Learnings from building AI-based code generator (#13719)
Browse files Browse the repository at this point in the history
* Codegen post - template file

* Checkpoint - intro, precision and recall

* Create meta.png

* Install KaTeX

* Try to fix the formulas

* Fix formula, add flow diagram

* Code complete

* Wording

* More wording changes

* More word-smithing

* Address feedback from Simon

* Adjust self-debugging description

Make it clearer that this is experimental.

* Remove H2 header

* Update content/blog/codegen-learnings/index.md

Co-authored-by: Gavin <[email protected]>

* Update content/blog/codegen-learnings/index.md

Co-authored-by: Gavin <[email protected]>

* Update content/blog/codegen-learnings/index.md

Co-authored-by: Gavin <[email protected]>

* Update content/blog/codegen-learnings/index.md

Co-authored-by: Gavin <[email protected]>

* Update content/blog/codegen-learnings/index.md

Co-authored-by: Gavin <[email protected]>

* Update content/blog/codegen-learnings/index.md

Co-authored-by: Gavin <[email protected]>

* Update content/blog/codegen-learnings/index.md

Co-authored-by: Gavin <[email protected]>

* Update content/blog/codegen-learnings/index.md

Co-authored-by: Gavin <[email protected]>

* Update content/blog/codegen-learnings/index.md

Co-authored-by: Gavin <[email protected]>

* Update content/blog/codegen-learnings/index.md

Co-authored-by: Adam Gordon Bell <[email protected]>

* Update content/blog/codegen-learnings/index.md

Co-authored-by: Adam Gordon Bell <[email protected]>

* Code review feedback

1. Tighten up the use of RAG: it's a technique, not database
2. Strengthen the conclusion

* Update publish date

* Improved "Wrapping up" section

* Update title

---------

Co-authored-by: Gavin <[email protected]>
Co-authored-by: Adam Gordon Bell <[email protected]>
  • Loading branch information
3 people authored Jan 7, 2025
1 parent bcd892e commit fa2e371
Show file tree
Hide file tree
Showing 8 changed files with 1,183 additions and 0 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/blog/codegen-learnings/flow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
350 changes: 350 additions & 0 deletions content/blog/codegen-learnings/flow.tldr
Original file line number Diff line number Diff line change
@@ -0,0 +1,350 @@
{
"tldrawFileFormatVersion": 1,
"schema": {
"schemaVersion": 2,
"sequences": {
"com.tldraw.store": 4,
"com.tldraw.asset": 1,
"com.tldraw.camera": 1,
"com.tldraw.document": 2,
"com.tldraw.instance": 25,
"com.tldraw.instance_page_state": 5,
"com.tldraw.page": 1,
"com.tldraw.instance_presence": 6,
"com.tldraw.pointer": 1,
"com.tldraw.shape": 4,
"com.tldraw.asset.bookmark": 2,
"com.tldraw.asset.image": 5,
"com.tldraw.asset.video": 5,
"com.tldraw.shape.group": 0,
"com.tldraw.shape.text": 2,
"com.tldraw.shape.bookmark": 2,
"com.tldraw.shape.draw": 2,
"com.tldraw.shape.geo": 9,
"com.tldraw.shape.note": 8,
"com.tldraw.shape.line": 5,
"com.tldraw.shape.frame": 0,
"com.tldraw.shape.arrow": 5,
"com.tldraw.shape.highlight": 1,
"com.tldraw.shape.embed": 4,
"com.tldraw.shape.image": 4,
"com.tldraw.shape.video": 2,
"com.tldraw.binding.arrow": 0
}
},
"records": [
{
"gridSize": 10,
"name": "",
"meta": {},
"id": "document:document",
"typeName": "document"
},
{
"meta": {},
"id": "page:page",
"name": "Page 1",
"index": "a1",
"typeName": "page"
},
{
"id": "pointer:pointer",
"typeName": "pointer",
"x": 669.8918917643175,
"y": 138.5839177911932,
"lastActivityTimestamp": 1735273096160,
"meta": {}
},
{
"followingUserId": null,
"opacityForNextShape": 1,
"stylesForNextShape": {
"tldraw:size": "s",
"tldraw:font": "sans",
"tldraw:geo": "arrow-right"
},
"brush": null,
"scribbles": [],
"cursor": {
"type": "default",
"rotation": 0
},
"isFocusMode": false,
"exportBackground": true,
"isDebugMode": false,
"isToolLocked": false,
"screenBounds": {
"x": 0,
"y": 0,
"w": 1516,
"h": 978
},
"insets": [
false,
false,
true,
false
],
"zoomBrush": null,
"isGridMode": true,
"isPenMode": false,
"chatMessage": "",
"isChatting": false,
"highlightedUserIds": [],
"isFocused": true,
"devicePixelRatio": 2,
"isCoarsePointer": false,
"isHoveringCanvas": false,
"openMenus": [],
"isChangingStyle": false,
"isReadonly": false,
"meta": {},
"duplicateProps": null,
"id": "instance:instance",
"currentPageId": "page:page",
"typeName": "instance"
},
{
"editingShapeId": "shape:w85ZdRavHw60qk11asf2f",
"croppingShapeId": null,
"selectedShapeIds": [
"shape:w85ZdRavHw60qk11asf2f"
],
"hoveredShapeId": "shape:w85ZdRavHw60qk11asf2f",
"erasingShapeIds": [],
"hintingShapeIds": [],
"focusedGroupId": null,
"meta": {},
"id": "instance_page_state:page:page",
"pageId": "page:page",
"typeName": "instance_page_state"
},
{
"x": 568.1002957356825,
"y": 95.68951970880681,
"z": 1,
"meta": {},
"id": "camera:page:page",
"typeName": "camera"
},
{
"x": -449.9453125,
"y": 90.6484375,
"rotation": 0,
"isLocked": false,
"opacity": 1,
"meta": {},
"id": "shape:BJfJwAyLKVoUOGaixU2Xf",
"type": "text",
"props": {
"color": "black",
"size": "s",
"w": 252.359375,
"text": "User query:\n\n\"Generate code for S3 Bucket\"",
"font": "sans",
"textAlign": "start",
"autoSize": true,
"scale": 1
},
"parentId": "page:page",
"index": "a1",
"typeName": "shape"
},
{
"x": -115.64453125,
"y": 66.3515625,
"rotation": 0,
"isLocked": false,
"opacity": 1,
"meta": {},
"id": "shape:z2gtvIBdf6_eCX2gzQ2L1",
"type": "text",
"props": {
"color": "black",
"size": "s",
"w": 310.2265625,
"text": "Search terms:\n\n\"AWS S3 bucket\",\n\"Pulumi AWS S3\",\n\"create S3 bucket Pulumi TypeScript\"",
"font": "sans",
"textAlign": "start",
"autoSize": true,
"scale": 1
},
"parentId": "page:page",
"index": "a22v7",
"typeName": "shape"
},
{
"x": -464.546875,
"y": 64.283203125,
"rotation": 0,
"isLocked": false,
"opacity": 1,
"meta": {},
"id": "shape:PGJKCoOonmat14xrifIp0",
"type": "geo",
"props": {
"w": 286.8671875,
"h": 132.9296875,
"geo": "rectangle",
"color": "black",
"labelColor": "black",
"fill": "none",
"dash": "draw",
"size": "s",
"font": "sans",
"text": "",
"align": "middle",
"verticalAlign": "middle",
"growY": 0,
"url": "",
"scale": 1
},
"parentId": "page:page",
"index": "a39Cr",
"typeName": "shape"
},
{
"x": -127.64453125,
"y": 44.542968750000014,
"rotation": 0,
"isLocked": false,
"opacity": 1,
"meta": {},
"id": "shape:hrkCX2QL0NyXDz_xl3n_i",
"type": "geo",
"props": {
"w": 342.9609375,
"h": 172.41015624999997,
"geo": "rectangle",
"color": "black",
"labelColor": "black",
"fill": "none",
"dash": "draw",
"size": "s",
"font": "sans",
"text": "",
"align": "middle",
"verticalAlign": "middle",
"growY": 0,
"url": "",
"scale": 1
},
"parentId": "page:page",
"index": "a40nT",
"typeName": "shape"
},
{
"x": -167.953125,
"y": 108.8125,
"rotation": 0,
"isLocked": false,
"opacity": 1,
"meta": {},
"id": "shape:0vPmbhCIhdgPr7gYnOxm9",
"type": "geo",
"props": {
"w": 35.16015625,
"h": 32.6484375,
"geo": "arrow-right",
"color": "black",
"labelColor": "black",
"fill": "none",
"dash": "draw",
"size": "s",
"font": "sans",
"text": "",
"align": "middle",
"verticalAlign": "middle",
"growY": 0,
"url": "",
"scale": 1
},
"parentId": "page:page",
"index": "a55Ml",
"typeName": "shape"
},
{
"x": 271.31640625,
"y": 45.166015625000014,
"rotation": 0,
"isLocked": false,
"opacity": 1,
"meta": {},
"id": "shape:zKhbmUEYseK-ARUqsueaU",
"type": "geo",
"props": {
"w": 461.8359375,
"h": 171.16406249999997,
"geo": "rectangle",
"color": "black",
"labelColor": "black",
"fill": "none",
"dash": "draw",
"size": "s",
"font": "sans",
"text": "",
"align": "middle",
"verticalAlign": "middle",
"growY": 0,
"url": "",
"scale": 1
},
"parentId": "page:page",
"index": "a6BSd",
"typeName": "shape"
},
{
"x": 285.83203125,
"y": 66.3515625,
"rotation": 0,
"isLocked": false,
"opacity": 1,
"meta": {},
"id": "shape:w85ZdRavHw60qk11asf2f",
"type": "text",
"props": {
"color": "black",
"size": "s",
"w": 424.9375,
"text": "Vector embeddings:\n\n[-0.0076232012,-0.010399864,0.0059319614,...],\n[-0.005639301,-0.023723211,0.0038147154,...],\n[0.018597506,-0.0078847855,0.0010430623,...]",
"font": "sans",
"textAlign": "start",
"autoSize": true,
"scale": 1
},
"parentId": "page:page",
"index": "a74wf",
"typeName": "shape"
},
{
"x": 226.046875,
"y": 108.8125,
"rotation": 0,
"isLocked": false,
"opacity": 1,
"meta": {},
"id": "shape:ariCerCfkEZAkC019XVqj",
"type": "geo",
"props": {
"w": 35.16015625,
"h": 32.6484375,
"geo": "arrow-right",
"color": "black",
"labelColor": "black",
"fill": "none",
"dash": "draw",
"size": "s",
"font": "sans",
"text": "",
"align": "middle",
"verticalAlign": "middle",
"growY": 0,
"url": "",
"scale": 1
},
"parentId": "page:page",
"index": "a8AEN",
"typeName": "shape"
}
]
}
Loading

0 comments on commit fa2e371

Please sign in to comment.