The Curator's Code: Navigating the AI Response Labyrinth for Optimal Results
Thomas Henry Oz Sandvik
Software Platform Architect at Terma | iOS & Apple Mobile/Web Technologies | Exploring AI
Although we as Curators get an easier task when we develop code or write tasks, there is an even bigger task ahead of us: To validate the result that our AI gives us.
In the extremely simple example below, I will iterate through a list of 10 strings and print them to the console. By asking ChatGPT: "Give example of a loop in Swift code interating 10 strings"
At first I get this result which is the simple for loop:
let stringsArray = ["Apple", "Banana", "Cherry", "Date", "Fig", "Grape", "Hazelnut", "Iris", "Jasmine", "Kumquat"]
for item in stringsArray {
??print(item)
}
If I ask it repeatedly, it keeps spitting out different results, all valid, but different, as shown here:
2nd query:
for index in 0..<stringsArray.count {
??print(stringsArray[index])
}
3rd inquiry:
for (index, item) in stringsArray.enumerated() {
??print("Element \(index): \(item)")
}
4th inquiry:
领英推荐
stringsArray.forEach { item in
??print(item)
}
5th inquiry:
var index = 0
while index < stringsArray.count {
??print(stringsArray[index])
??index += 1
}
6th inquiry
var index = 0
repeat {
??print(stringsArray[index])
??index += 1
} while index < stringsArray.count
and the 7th inquiry
_ = stringsArray.map { item in
??print(item)
}
So as the Curator, the role of selecting between different results is crucial for multiple reasons. Making the right choice can lead to better understanding, more efficient code, and improved outcomes. Here are some important factors to consider when choosing between different results - of course with more complex results than what I have used as an example above:
In summary, as a Curator, it is important to consider various factors, including readability, performance, idiomatic style, reusability, adaptability, testability, and maintainability, when choosing between different results. Balancing these aspects can lead to a better overall solution that benefits both developers and end-users.?
What we learned in elementary school about "Source criticism" has become even more important with AI. That we ourselves validate the results given to us based on a solid base of knowledge and education.